diff options
author | Michael Mann <mmann78@netscape.net> | 2017-11-25 23:42:47 -0500 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-11-26 08:48:04 +0000 |
commit | c0514ac4330695c66d346067d99a429c2bb6abbe (patch) | |
tree | ff6ba867b3e76bbbfbb75ff5f14eb9c79fd86f65 /ui | |
parent | 9b7ad9c20e3dd81b66251a058874a2c63e42b458 (diff) |
Bugfix DCE/RPC Decode As for GTK.
An attempt at optimization broke GTK DCE/RPC Decode As because DCE/RPC
dissector tables aren't FT_UINT type. The "optimization" was trying
to retrieve dissector handle from FT_UINT typed dissector table.
Move retrieval of dissector handle to under FT_UINT check
Change-Id: Id81cd79db60263155392aaac0c796a6484ef7504
Reviewed-on: https://code.wireshark.org/review/24589
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk/decode_as_dlg.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/gtk/decode_as_dlg.c b/ui/gtk/decode_as_dlg.c index 86f231bc63..b7c6808baa 100644 --- a/ui/gtk/decode_as_dlg.c +++ b/ui/gtk/decode_as_dlg.c @@ -692,14 +692,14 @@ decode_simple (GtkWidget *notebook_pg) guint8 saved_curr_layer_num = cfile.edt->pi.curr_layer_num; cfile.edt->pi.curr_layer_num = (guint8)GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(notebook_pg), E_PAGE_CURR_LAYER_NUM)); value_ptr = entry->values[requested_index].build_values[value_loop](&cfile.edt->pi); - /* Find the handle currently associated with the value */ - temp_handle = dissector_get_uint_handle(sub_dissectors, GPOINTER_TO_UINT(value_ptr)); if (abbrev != NULL && strcmp(abbrev, "(default)") == 0) { add_reset_list = entry->reset_value(table_name, value_ptr); /* For now, only numeric dissector tables can use preferences */ if (IS_FT_UINT(dissector_table_get_type(sub_dissectors))) { + /* Find the handle currently associated with the value */ + temp_handle = dissector_get_uint_handle(sub_dissectors, GPOINTER_TO_UINT(value_ptr)); if (temp_handle != NULL) { module = prefs_find_module(proto_get_protocol_filter_name(dissector_handle_get_protocol_index(temp_handle))); pref_value = prefs_find_preference(module, table_name); @@ -723,6 +723,8 @@ decode_simple (GtkWidget *notebook_pg) } } else { + /* Find the handle currently associated with the value */ + temp_handle = dissector_get_uint_handle(sub_dissectors, GPOINTER_TO_UINT(value_ptr)); if (temp_handle != NULL) { module = prefs_find_module(proto_get_protocol_filter_name(dissector_handle_get_protocol_index(temp_handle))); pref_value = prefs_find_preference(module, table_name); |