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 <a.broman58@gmail.com>
This commit is contained in:
Pascal Quantin 2016-08-23 22:10:08 +02:00 committed by Anders Broman
parent 20908f55f6
commit 2095b32599
1 changed files with 3 additions and 3 deletions

View File

@ -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;