aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-iscsi.c
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2006-09-30 20:40:04 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2006-09-30 20:40:04 +0000
commit7b806aa0d639f580e6ddaf798793510facde0a31 (patch)
tree6c29e8d89965969083fb2f3d7b3964afa50dda25 /epan/dissectors/packet-iscsi.c
parentc93b7ef4fc3e5172096c7c01fc548c30f34e4ffb (diff)
the ahs length inside the AHS for an extended cdb includes the reserved byte before the start of cdb data
account for this extra reserved byte in the ahs length so that the reconstructed cdb has the correct length and does not contain one extra byte at the end git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19387 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-iscsi.c')
-rw-r--r--epan/dissectors/packet-iscsi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-iscsi.c b/epan/dissectors/packet-iscsi.c
index 9e7bc0dbde..fd191f56dd 100644
--- a/epan/dissectors/packet-iscsi.c
+++ b/epan/dissectors/packet-iscsi.c
@@ -1517,15 +1517,15 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
/* We have a variable length CDB where bytes >16 is transported
* in the AHS.
*/
- cdb_buf=ep_alloc(16+ahs_length);
+ cdb_buf=ep_alloc(16+ahs_length-1);
/* the 16 first bytes of the cdb */
tvb_memcpy(tvb, cdb_buf, cdb_offset, 16);
/* hte remainder of the cdb from the ahs */
- tvb_memcpy(tvb, cdb_buf+16, cdb_offset+20, ahs_length);
+ tvb_memcpy(tvb, cdb_buf+16, cdb_offset+20, ahs_length-1);
cdb_tvb = tvb_new_real_data(cdb_buf,
- ahs_length+16,
- ahs_length+16);
+ ahs_length+16-1,
+ ahs_length+16-1);
tvb_set_child_real_data_tvbuff(tvb, cdb_tvb);