mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
* layout.c (print_vfs_message): format string vulnerability fixed
This commit is contained in:
parent
e3b9315cd8
commit
62329f26d0
@ -1,3 +1,7 @@
|
||||
2000-11-14 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
* layout.c (print_vfs_message): format string vulnerability fixed
|
||||
|
||||
2000-11-03 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
* main.c (CmdMenu): don't include edit_user_menu_cmd ()
|
||||
|
15
src/layout.c
15
src/layout.c
@ -779,7 +779,7 @@ low_level_change_screen_size (void)
|
||||
LINES = winsz.ws_row;
|
||||
#endif
|
||||
#ifdef HAVE_SUBSHELL_SUPPORT
|
||||
resize_subshell ();
|
||||
resize_subshell ();
|
||||
#endif
|
||||
}
|
||||
#endif /* TIOCGWINSZ && !SCO_FLAVOR */
|
||||
@ -860,22 +860,19 @@ void print_vfs_message (char *msg, ...)
|
||||
char str [128];
|
||||
|
||||
va_start (ap, msg);
|
||||
|
||||
g_vsnprintf (str, 126, msg, ap);
|
||||
|
||||
g_vsnprintf (str, sizeof (str), msg, ap);
|
||||
va_end (ap);
|
||||
|
||||
|
||||
if (midnight_shutdown)
|
||||
return;
|
||||
|
||||
if (!message_visible || !the_hint || !the_hint->widget.parent) {
|
||||
int i;
|
||||
|
||||
if (!nice_rotating_dash || (ok_to_refresh <= 0))
|
||||
return;
|
||||
move (0, 0);
|
||||
printw (str);
|
||||
for (i=strlen(str); i<COLS-1; i++)
|
||||
printw (" ");
|
||||
printw ("%-*s", COLS-1, str);
|
||||
mc_refresh ();
|
||||
return;
|
||||
}
|
||||
@ -955,7 +952,7 @@ void set_display_type (int num, int type)
|
||||
Widget *new_widget, *old_widget;
|
||||
WPanel *the_other_panel;
|
||||
|
||||
x =y = cols = lines = 0;
|
||||
x = y = cols = lines = 0;
|
||||
old_widget = 0;
|
||||
if (num >= MAX_VIEWS){
|
||||
fprintf (stderr, "Could not allocate more that %d views\n", MAX_VIEWS);
|
||||
|
Loading…
Reference in New Issue
Block a user