[gimp] imagemap: Don't use fixed size buffer to print statusbar	messages (#691386)
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gimp] imagemap: Don't use fixed size buffer to print statusbar	messages (#691386)
- Date: Wed, 16 Jan 2013 11:54:04 +0000 (UTC)
commit 5d1c8726a3f2f5894724a785b9189f7c78367454
Author: Mukund Sivaraman <muks banu com>
Date:   Wed Jan 16 17:23:52 2013 +0530
    imagemap: Don't use fixed size buffer to print statusbar messages (#691386)
 plug-ins/imagemap/imap_statusbar.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/imagemap/imap_statusbar.c b/plug-ins/imagemap/imap_statusbar.c
index a84b8a9..762d5c5 100644
--- a/plug-ins/imagemap/imap_statusbar.c
+++ b/plug-ins/imagemap/imap_statusbar.c
@@ -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
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]