From 9ad5b2ac545ad985821d1cc2daea934cd0d1d32b Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Mon, 14 May 2001 23:06:43 +0000 Subject: [PATCH] * gtools.c (message): Use g_vsnprintf(). Make the "text" argument constant. --- gnome/ChangeLog | 5 +++++ gnome/gtools.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gnome/ChangeLog b/gnome/ChangeLog index 8e1107af4..9707656cb 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,8 @@ +2001-05-14 Pavel Roskin + + * gtools.c (message): Use g_vsnprintf(). Make the "text" + argument constant. + 2001-04-30 Pavel Roskin * directory.xpm: Remove. diff --git a/gnome/gtools.c b/gnome/gtools.c index 82d5ad002..72fec177c 100644 --- a/gnome/gtools.c +++ b/gnome/gtools.c @@ -89,7 +89,7 @@ query_dialog (char *header, char *text, int flags, int count, ...) /* To show nice messages to the users */ Dlg_head * -message (int error, char *header, char *text, ...) +message (int error, char *header, const char *text, ...) { va_list args; char buffer [4096]; @@ -98,7 +98,7 @@ message (int error, char *header, char *text, ...) /* Setup the display information */ strcpy (buffer, "\n"); va_start (args, text); - vsprintf (&buffer [1], text, args); + g_vsnprintf (&buffer [1], sizeof (buffer), text, args); strcat (buffer, "\n"); va_end (args);