Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: [Ethereal-dev] [PATCH] 0.10.5 segfaults in Preferences/Capture/Interface/Edit

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

From: Pavel Kankovsky <kan@xxxxxxx>
Date: Mon, 12 Jul 2004 18:41:20 +0200 (CEST)
Ethereal 0.10.5 (built with GTK1) crashes when "Interface: Edit"
button is clicked in Preferences/Capture. The culprit is a bug in 
ifopts_options_add() introduced in rev 1.36 of gtk/capture_prefs.c.
Here is a patch fixing it:

--- ethereal-0.10.5/gtk/capture_prefs.c.orig	Mon Jun 21 04:38:20 2004
+++ ethereal-0.10.5/gtk/capture_prefs.c	Mon Jul 12 18:12:36 2004
@@ -638,7 +638,7 @@
 		if (if_info->description != NULL)
 			text[1] = g_strdup(if_info->description);
 		else
-			text[1] = "";
+			text[1] = g_strdup("");
 		/* set empty description */
 		text[2] = g_strdup("");
 		/* check if interface is "hidden" */
@@ -662,7 +662,7 @@
 		if (if_info->description != NULL)
 			text[1] = g_strdup(if_info->description);
 		else
-			text[1] = "";
+			text[1] = g_strdup("");
 		/* set empty description */
 		text[2] = g_strdup("");
 		/* interface is not "hidden" */


-- 
Pavel Kankovsky, DCIT s.r.o., Kodanska 1441/46, 100 10 Praha 10, CZ
tel (+420) 234 066 114, fax (+420) 234 066 112, url http://www.dcit.cz/