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
This commit is contained in:
parent
5efda930a6
commit
f7d834b564
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue