From 2095b325998f1da06a4e80efeb186ec99d6e39ed Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Tue, 23 Aug 2016 22:10:08 +0200 Subject: call_heur_dissector_direct: do not trigger an assert if heuristic dissector rejects packet This can happen for example is the heuristics changed between the Wireshark version used to export PDUs, and the one used to open the file. Instead, call data dissector. Change-Id: I29f7754f883fd710c3557a610583ef988ca13e43 Reviewed-on: https://code.wireshark.org/review/17280 Reviewed-by: Anders Broman --- epan/packet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'epan/packet.c') diff --git a/epan/packet.c b/epan/packet.c index 059c975125..018f15555e 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -2853,16 +2853,16 @@ void call_heur_dissector_direct(heur_dtbl_entry_t *heur_dtbl_entry, tvbuff_t *tv if (heur_dtbl_entry->protocol != NULL) { /* do NOT change this behavior - wslua uses the protocol short name set here in order - to determine which Lua-based heurisitc dissector to call */ + to determine which Lua-based heuristic dissector to call */ pinfo->current_proto = proto_get_protocol_short_name(heur_dtbl_entry->protocol); wmem_list_append(pinfo->layers, GINT_TO_POINTER(proto_get_id(heur_dtbl_entry->protocol))); } pinfo->heur_list_name = heur_dtbl_entry->list_name; - /* call the dissector, as we have saved the result heuristic failure is an error */ + /* call the dissector, in case of failure call data handle (might happen with exported PDUs) */ if(!(*heur_dtbl_entry->dissector)(tvb, pinfo, tree, data)) - g_assert_not_reached(); + call_dissector_work(data_handle, tvb, pinfo, tree, TRUE, NULL); /* Restore info from caller */ pinfo->can_desegment = saved_can_desegment; -- cgit v1.2.1