summaryrefslogtreecommitdiff
path: root/epan/packet.c
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2006-08-10 10:09:31 +0000
committerJörg Mayer <jmayer@loplof.de>2006-08-10 10:09:31 +0000
commit41d8f13aeccfb14576bfc4ebc9d9e2767d1feac7 (patch)
treec8476e3c55462bcff36980655d50e2c596bac10a /epan/packet.c
parent13fae810075fd17e1d2a3473efec3a4977e3e12b (diff)
downloadwireshark-41d8f13aeccfb14576bfc4ebc9d9e2767d1feac7.tar.gz
Neil Piercy:
I've just had a bug in one of our private dissectors which meant that the handle passed to call_dissector was null. This seemed to give varying behavior - on some Windows installations it hit wireshark's in-built exception handling, and displayed that the dissector had an error (correct), but on some installations it just crashed wireshark (not helpful). I _think_ the difference was whether MSVC was installed or not, but on a sample of only 3 machines. Should call_dissector include explicit null handle checks, and if so, should it:- a) g_assert - the simple patch attached b) fallback to doing a data decode (as disabled protocols do) c) try to invoke the wireshark exception handling for the packet Or is the correct answer none of the above - the exception handler should already cope ? svn path=/trunk/; revision=18869
Diffstat (limited to 'epan/packet.c')
-rw-r--r--epan/packet.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/packet.c b/epan/packet.c
index 86e4782464..22afd47c56 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -1702,6 +1702,7 @@ call_dissector(dissector_handle_t handle, tvbuff_t *tvb,
{
int ret;
+ g_assert(handle != NULL);
ret = call_dissector_work(handle, tvb, pinfo, tree);
if (ret == 0) {
/*