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
This commit is contained in:
Ronnie Sahlberg 2006-09-30 20:40:04 +00:00
parent ee8abeec9e
commit 71af839c39

View file

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