aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-smb2.c
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2007-05-15 20:46:45 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2007-05-15 20:46:45 +0000
commite30fb5e6123e0d587503fe4b1adda0d8eb429fb9 (patch)
tree40cd09a065030811b15ebd7e041177ba03e995bd /epan/dissectors/packet-smb2.c
parent0561fe2e691b87dc98dccf6f36608cbb7186c7a9 (diff)
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21795 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-smb2.c')
-rw-r--r--epan/dissectors/packet-smb2.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c
index f180b3c443..dc5b4875d1 100644
--- a/epan/dissectors/packet-smb2.c
+++ b/epan/dissectors/packet-smb2.c
@@ -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;