forked from osmocom/wireshark
when spawning off to the next smb2 pdu in a chain we need to create a
new tvb for it or else the offset/length calculations for where blobs a next_tvb=tvb_new_subset(tvb, chain_offset, MIN((int)len, tvb_length_remaining(tvb, off)), len); re in the packets are wrong. svn path=/trunk/; revision=21795
This commit is contained in:
parent
827df92fb1
commit
99c98d6c6e
|
@ -4453,9 +4453,14 @@ dissect_smb2(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_t
|
|||
offset = dissect_smb2_command(pinfo, tree, tvb, offset, si);
|
||||
|
||||
if (chain_offset > 0) {
|
||||
if ((old_offset+chain_offset) < offset)
|
||||
tvbuff_t *next_tvb;
|
||||
|
||||
if ((old_offset+chain_offset) < offset) {
|
||||
THROW(ReportedBoundsError);
|
||||
offset = dissect_smb2(tvb, old_offset+chain_offset, pinfo, parent_tree);
|
||||
}
|
||||
|
||||
next_tvb = tvb_new_subset(tvb, chain_offset, -1, -1);
|
||||
offset = dissect_smb2(next_tvb, 0, pinfo, parent_tree);
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
|
Loading…
Reference in New Issue