[gimp/gimp-2-8] imagemap: Don't use fixed size buffer to print statusbar messages (#691386)



commit c87b59b95f3518d6c0e77b2695ee412ed65fc555
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]