mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 19:30:13 -06:00
ccmake: fix status line buffer overflow on very wide terminals
A mistyped length calculation will memset across stack frame when the user's terminal width is larger than 270.
This commit is contained in:
@@ -475,7 +475,7 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
|
||||
strncpy(bar + curFieldLen + 2, help, width - curFieldLen - 2);
|
||||
if (curFieldLen + helpLen + 2 < width) {
|
||||
memset(bar + curFieldLen + helpLen + 2, ' ',
|
||||
width - curFieldLen + helpLen + 2);
|
||||
width - (curFieldLen + helpLen + 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user