aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-02-07 19:45:56 +0000
committerGuy Harris <guy@alum.mit.edu>2003-02-07 19:45:56 +0000
commitc8386a58293f820f530e49d53239b0fec573d70d (patch)
tree41e327f0a1be74725caca7ff7f4b9f9c5a032f2d
parent579d05d1f3155a4193150ef7f5426e067c84ca9c (diff)
Catch ReportedBoundsError when dissecting even non-encrypted stub data,
so that even if the stub data is bad, we still dissect and show the verifier. svn path=/trunk/; revision=7092
-rw-r--r--packet-dcerpc.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/packet-dcerpc.c b/packet-dcerpc.c
index cf8aefa4ef..1b56f12694 100644
--- a/packet-dcerpc.c
+++ b/packet-dcerpc.c
@@ -2,7 +2,7 @@
* Routines for DCERPC packet disassembly
* Copyright 2001, Todd Sabin <tas@webspan.net>
*
- * $Id: packet-dcerpc.c,v 1.101 2003/02/07 08:56:11 guy Exp $
+ * $Id: packet-dcerpc.c,v 1.102 2003/02/07 19:45:56 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1522,7 +1522,7 @@ dcerpc_try_handoff (packet_info *pinfo, proto_tree *tree,
dcerpc_uuid_key key;
dcerpc_uuid_value *sub_proto;
int length;
- proto_tree *sub_tree = NULL;
+ proto_tree *volatile sub_tree = NULL;
dcerpc_sub_dissector *proc;
gchar *name = NULL;
dcerpc_dissect_fnct_t *volatile sub_dissect;
@@ -1647,9 +1647,9 @@ dcerpc_try_handoff (packet_info *pinfo, proto_tree *tree,
pinfo->current_proto = saved_proto;
pinfo->private_data = saved_private_data;
}
- }
+ }
break;
- }
+ }
}
}
} else {
@@ -1661,7 +1661,17 @@ dcerpc_try_handoff (packet_info *pinfo, proto_tree *tree,
pinfo->private_data = (void *)info;
init_ndr_pointer_list(pinfo);
- offset = sub_dissect (tvb, offset, pinfo, sub_tree, drep);
+ /*
+ * Catch ReportedBoundsError, so that even if the stub
+ * data is bad, we still show the verifier.
+ */
+ TRY {
+ offset = sub_dissect (tvb, offset, pinfo, sub_tree, drep);
+ } CATCH(BoundsError) {
+ RETHROW;
+ } CATCH(ReportedBoundsError) {
+ show_reported_bounds_error(tvb, pinfo, tree);
+ } ENDTRY;
pinfo->current_proto = saved_proto;
pinfo->private_data = saved_private_data;