diff options
author | Berk Geveci <berk.geveci@kitware.com> | 2001-12-04 20:53:33 (GMT) |
---|---|---|
committer | Berk Geveci <berk.geveci@kitware.com> | 2001-12-04 20:53:33 (GMT) |
commit | 0a33722a85d9cdd226447255d49ef05d009b33bf (patch) | |
tree | 3a697277ad9f99535d17347dee4a9b180042a9c5 /Source/CursesDialog | |
parent | 06ac35356418466c2f7a7062c482f1493d0db0ea (diff) | |
download | CMake-0a33722a85d9cdd226447255d49ef05d009b33bf.zip CMake-0a33722a85d9cdd226447255d49ef05d009b33bf.tar.gz CMake-0a33722a85d9cdd226447255d49ef05d009b33bf.tar.bz2 |
Fixed overflow problem.
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r-- | Source/CursesDialog/cmCursesMainForm.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 516a945..e452c3f 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -357,14 +357,8 @@ void cmCursesMainForm::UpdateStatusBar() if (entry) { helpString = entry->m_HelpString.c_str(); - if (strlen(helpString) > 127) - { - sprintf(help,"%127s", helpString); - } - else - { - sprintf(help,"%s", helpString); - } + strncpy(help, helpString, 127); + help[127] = '\0'; } else { |