Ethereal-dev: [Ethereal-dev] [Patch] Ethereal crashes by trying to edit preferences

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Nathan Jennings <njen@xxxxxxxxxxxx>
Date: Fri, 04 Feb 2005 22:48:30 -0500
Hirsch, Christian wrote:
Hello Ethereal-Community,

everytime I try to chance the preferences --> Capture --> Interfaces --> Edit...
Ethereal crashes with the message:
*** glibc detected *** free(): invalid pointer: 0x080c9252 ***

Ouch! My apologies. This is mine. 8-(


Enclosed you'll find the backtrace.

Thanks a ton for including this; it's a huge timesaver.

Please see attached patch.

-Nathan
Index: gtk/capture_prefs.c
===================================================================
--- gtk/capture_prefs.c	(revision 13296)
+++ gtk/capture_prefs.c	(working copy)
@@ -681,7 +681,7 @@
 	gint i;
 	
 	for (i=0; i < IFOPTS_CLIST_COLS; i++) {
-		if (text[i] != NULL) {
+		if (*text[i] != NULL) {
 			g_free(text[i]);
 			text[i] = NULL;
 		}