aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-09-30 20:40:04 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-09-30 20:40:04 +0000
commit71af839c39ae604df5702acd28509aca50e6fcfd (patch)
tree6c29e8d89965969083fb2f3d7b3964afa50dda25 /epan
parentee8abeec9e3f7df936b25789673942c40698f633 (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 svn path=/trunk/; revision=19387
Diffstat (limited to 'epan')
-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);