[BUG]: Gmc



IYFG, folks and Happy New Year !

Looks like a bug in mc/gnome/gscren.c:panel_fill_panel_list (see the
patch):
gtk_clist_append() gets called with `texts` being an array with count
less
than the number of columns in the clist, which crashes in
real_insert_row().
And if it's OK for the counts to differ, the patch should do.

Regards,
-velco.
PS. Maybe it's that I've upgraded my glibc, maybe it's the latest
patches
from CVS, maybe it's becouse of the new year, but at last the average
GNOME
crash frequency allowed me to keep it on the my desktop. gr8 !!!
Index: gnome/gscreen.c
===================================================================
RCS file: /cvs/gnome/mc/gnome/gscreen.c,v
retrieving revision 1.141
diff -u -r1.141 gscreen.c
--- gnome/gscreen.c	1999/01/01 02:05:01	1.141
+++ gnome/gscreen.c	1999/01/01 10:18:13
@@ -163,7 +163,7 @@
 	int i, col, type_col, color;
 	char  **texts;
 
-	texts = malloc (sizeof (char *) * items);
+	texts = malloc (sizeof (char *) * (items+1));
 
 	gtk_clist_freeze (GTK_CLIST (cl));
 	gtk_clist_clear (GTK_CLIST (cl));
@@ -189,6 +189,7 @@
 				texts [col] = (*format->string_fn)(fe, 10);
 			col++;
 		}
+		texts[col] = NULL;
 		gtk_clist_append (cl, texts);
 
 		color = file_compute_color (fe->f.marked ? MARKED : NORMAL, fe);


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