* wtools.c (message): Fix possible buffer overflow.

This commit is contained in:
Andrew V. Samoilov 2002-07-25 18:07:42 +00:00
parent 8c9c34918b
commit b5cfea00e1
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
2002-07-25 Andrew V. Samoilov <kai@cmail.ru>
* wtools.c (message): Fix possible buffer overflow.
* slint.c [HAVE_MAD] (dealloc_color_pairs): Move ...
* color.c [HAVE_MAD]: ... here and make accessible from
other files to fix compilation.

View File

@ -294,7 +294,7 @@ Dlg_head *message (int error, char *header, const char *text, ...)
/* Setup the display information */
strcpy (buffer, "\n");
va_start (args, text);
g_vsnprintf (&buffer [1], sizeof (buffer) - 1, text, args);
g_vsnprintf (&buffer [1], sizeof (buffer) - 2, text, args);
strcat (buffer, "\n");
va_end (args);