PATCH: gmenu segfaults on the "about" panel



Package: gnome-core
Version: 0.99.5.1

When I click on "About" in gmenu, it segfaults.

Program received signal SIGSEGV, Segmentation fault.
gtk_marshal_NONE__NONE (object=???, func=???, func_data=???, args=???)
    at gtkmarshal.c:365
365     }

In the about_cb function, the authors array is statically allocated to 2
entries.  Later, the about_cb function is writing past the end of the
array.  Here is a patch to fix it:

--- gmenu.c.segfault    Fri Feb  5 09:11:09 1999
+++ gmenu.c     Fri Feb  5 09:11:25 1999
@@ -288,7 +288,7 @@
 static void about_cb(GtkWidget *w, gpointer data)
 {
        GtkWidget *about;
-       const gchar *authors[2];
+       const gchar *authors[3];
        gchar version[32];
 
        sprintf(version,"%d.%d.%d",GMENU_VERSION_MAJOR,
GMENU_VERSION_MINOR, GMENU_VERSION_REV);

Happy hunting,
Jeffrey
-- 
Jeffrey W. Baker
Critical Path, Inc
Speaking for myself only, of course



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