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:
Ronnie Sahlberg 2007-05-15 20:46:45 +00:00
parent 827df92fb1
commit 99c98d6c6e
1 changed files with 7 additions and 2 deletions

View File

@ -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;