diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2016-08-23 22:10:08 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-08-24 07:26:40 +0000 |
commit | 2095b325998f1da06a4e80efeb186ec99d6e39ed (patch) | |
tree | 212fbcffff2ea0e29a4995e5319f532f887edb2b | |
parent | 20908f55f6c93fb79fbd39e60affa2d4428b4951 (diff) |
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>
-rw-r--r-- | epan/packet.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |