Blame wireshark-0016-Crash-when-selecting-Decode-As-based-on-SCTP-PPID.-B.patch

61af30
From: Michael Mann <mmann78@netscape.net>
61af30
Date: Thu, 28 Nov 2013 16:51:08 +0000
61af30
Subject: [PATCH] Crash when selecting "Decode As" based on SCTP PPID.  Bug
61af30
 8976 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8976)
61af30
61af30
Fixed by defaulting PPID value to LAST_PPID (which should make Decode As a no-op)
61af30
61af30
svn path=/trunk-1.10/; revision=53627
61af30
61af30
diff --git a/ui/gtk/decode_as_dlg.c b/ui/gtk/decode_as_dlg.c
61af30
index e772099..4e863f1 100644
61af30
--- a/ui/gtk/decode_as_dlg.c
61af30
+++ b/ui/gtk/decode_as_dlg.c
61af30
@@ -970,7 +970,7 @@ decode_transport(GtkWidget *notebook_pg)
61af30
     gchar *table_name;
61af30
     gint requested_srcdst, requested_port, ppid;
61af30
     gpointer portp;
61af30
-    gpointer ptr;
61af30
+    gpointer ptr = GUINT_TO_POINTER(LAST_PPID);
61af30
 #ifdef DEBUG
61af30
     gchar *string;
61af30
 #endif
61af30
@@ -980,8 +980,7 @@ decode_transport(GtkWidget *notebook_pg)
61af30
         gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(GTK_TREE_VIEW(list)));
61af30
 
61af30
     combo_box = (GtkWidget *)g_object_get_data(G_OBJECT(notebook_pg), E_COMBO_BOX_SRCDST);
61af30
-    if (!ws_combo_box_get_active_pointer(GTK_COMBO_BOX(combo_box), &ptr))
61af30
-        g_assert_not_reached();  /* Programming error if no active item in combo_box */
61af30
+    ws_combo_box_get_active_pointer(GTK_COMBO_BOX(combo_box), &ptr);
61af30
     requested_srcdst = GPOINTER_TO_INT(ptr);
61af30
 
61af30
 #ifdef DEBUG