imagemap: Don't use fixed size buffer to print statusbar messages (#691386)

This commit is contained in:
Mukund Sivaraman 2013-01-16 17:23:52 +05:30
parent 0e54de7f1e
commit 5d1c8726a3
1 changed files with 4 additions and 3 deletions

View File

@ -92,16 +92,17 @@ void
statusbar_set_status(StatusBar_t *statusbar, const gchar *format, ...)
{
va_list ap;
char scratch[256];
char *str;
va_start(ap, format);
vsprintf(scratch, format, ap);
str = g_strdup_vprintf (format, ap);
va_end(ap);
statusbar_clear_status(statusbar);
statusbar->message_id =
gtk_statusbar_push(GTK_STATUSBAR(statusbar->status),
statusbar->status_id, scratch);
statusbar->status_id, str);
g_free (str);
}
void