aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2012-06-26 16:06:26 +0000
committerBill Meier <wmeier@newsguy.com>2012-06-26 16:06:26 +0000
commitf7d834b5649a0398309f1beb8b857dbc6672abe6 (patch)
treef762fafa8f2ddf113c7f0201264ed3113d7e5f98 /epan
parent5efda930a65dafb5b29f7f7033b9a9cbc53b0b6c (diff)
Validate 'offset' before calling proto_item_set_end(); prevents potential 'Dissector Bug' msg
Addresses comment in Bug #7390 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7390#c1 svn path=/trunk/; revision=43496
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-smb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c
index 0941f1ec71..8f5069b344 100644
--- a/epan/dissectors/packet-smb.c
+++ b/epan/dissectors/packet-smb.c
@@ -16988,6 +16988,10 @@ dissect_smb_command(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *s
smb_dissector[cmd].request:smb_dissector[cmd].response;
offset = (*dissector)(tvb, pinfo, cmd_tree, offset, smb_tree);
+
+ if (!tvb_offset_exists(tvb, offset-1)) {
+ THROW(ReportedBoundsError);
+ }
proto_item_set_end(cmd_item, tvb, offset);
}
return offset;