diff options
author | V <v@anomalous.eu> | 2021-01-08 05:11:45 +0100 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2021-01-08 11:06:38 +0100 |
commit | bfcb8ca0196eef942e6363e2fd7faa80eddec644 (patch) | |
tree | fd59494a48c8c8bf208907a2d040adf152c374ce /InfoScreen.c | |
parent | 27db9297b77c7dd1cb48f334fded7f3c21d5730c (diff) |
InfoScreen: fix uncontrolled format string
mvwprintw takes a format string as its fourth argument, and title is
user-controlled. This results in e.g. crashing when trying to trace a
process with a format specifier in its command line.
Diffstat (limited to 'InfoScreen.c')
-rw-r--r-- | InfoScreen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/InfoScreen.c b/InfoScreen.c index 3681088a..9647b9fe 100644 --- a/InfoScreen.c +++ b/InfoScreen.c @@ -54,7 +54,7 @@ void InfoScreen_drawTitled(InfoScreen* this, const char* fmt, ...) { attrset(CRT_colors[METER_TEXT]); mvhline(0, 0, ' ', COLS); - mvwprintw(stdscr, 0, 0, title); + mvaddstr(0, 0, title); attrset(CRT_colors[DEFAULT_COLOR]); Panel_draw(this->display, true, true, true, false); |