diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2015-10-25 21:15:21 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-11-10 08:55:45 +0000 |
commit | 3e5b2537f7fdff838f611f779fff526cdda1a2a3 (patch) | |
tree | 0797f7d1854c7ba18e0f4270e8e4ad3d910ce023 | |
parent | d05971449b9826897c5d4fb06158f98f248f68d8 (diff) |
RPC: call REPORT_DISSECTOR_BUG() rather than abort().
Checking WIRESHARK_ABORT_ON_DISSECTOR_BUG here looks somewhat redundant but it's not:
it's needed to prevent REPORT_DISSECTOR_BUG() from throwing an exception when
we're not dissecting (when nobody's going to catch the exception).
Change-Id: I4dfc484bdf13bca236bfff1388d4399e26880ad7
Reviewed-on: https://code.wireshark.org/review/11272
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/dissectors/packet-rpc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/epan/dissectors/packet-rpc.c b/epan/dissectors/packet-rpc.c index 32b25f341b..e818ace084 100644 --- a/epan/dissectors/packet-rpc.c +++ b/epan/dissectors/packet-rpc.c @@ -564,20 +564,26 @@ rpc_init_prog(int proto, guint32 prog, int ett, size_t nvers, proto_get_protocol_long_name(value->proto), versions[versidx].vers, proc->strptr); + + /* Abort out if desired - but don't throw an exception here! */ if (getenv("WIRESHARK_ABORT_ON_DISSECTOR_BUG") != NULL) - abort(); + REPORT_DISSECTOR_BUG("RPC: No call handler!"); + continue; } dissector_add_custom_table_handle("rpc.call", g_memdup(&key, sizeof(rpc_proc_info_key)), new_create_dissector_handle_with_name(proc->dissect_call, value->proto_id, proc->strptr)); if (proc->dissect_reply == NULL) { - fprintf(stderr, "OOPS: No call handler for %s version %u procedure %s\n", + fprintf(stderr, "OOPS: No reply handler for %s version %u procedure %s\n", proto_get_protocol_long_name(value->proto), versions[versidx].vers, proc->strptr); + + /* Abort out if desired - but don't throw an exception here! */ if (getenv("WIRESHARK_ABORT_ON_DISSECTOR_BUG") != NULL) - abort(); + REPORT_DISSECTOR_BUG("RPC: No reply handler!"); + continue; } dissector_add_custom_table_handle("rpc.reply", g_memdup(&key, sizeof(rpc_proc_info_key)), |