[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#386752: cdebconf-gtk-udeb: Probably not enough memory allocated for string



Package: cdebconf-gtk-udeb
Version: 0.105
Severity: normal
Tags: patch

I had a look at frontend/gtk/gtk.c and think that in
expose_event_callback() the argument to malloc() (line 244) is to
small. In the following line the sprintf() does not only use "<b></b>"
but "<b><span foreground="#ffffff"></span></b>". So I suppose there
should be room for 34 characters more.


Aike
--- gtk.c.orig	2006-06-15 15:31:08.000000000 +0200
+++ gtk.c	2006-09-09 22:58:00.000000000 +0200
@@ -241,7 +241,11 @@
     if (obj->info != NULL) {
         char *text = q_get_description(obj->info);
         if (text) {
+            #if GTK_CHECK_VERSION(2,8,0)
+            message = malloc(strlen(text) + 42 );
+            #else
             message = malloc(strlen(text) + 8 );
+            #endif
             /* TODO */
             /* setting custom font colours would make GTKDFB 2.0.9 crash */
             /* this issue has already been fixed in recent GTKDFB verions */

Reply to: