forked from osmocom/wireshark
SCSI: Mode Sense 10: Wrong block descriptor length
Issue reported by Sharon Samuel Enoch Bug:12780 Change-Id: I94ad5355cdfa4d8cd3915c9e261931ff56dc765b Reviewed-on: https://code.wireshark.org/review/17272 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
5213496250
commit
20908f55f6
|
@ -4948,10 +4948,10 @@ dissect_spc_modesense10(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
offset += 2; /* skip LongLBA byte and reserved byte */
|
||||
tot_len -= 2;
|
||||
|
||||
if (tot_len < 1)
|
||||
if (tot_len < 2)
|
||||
return;
|
||||
desclen = tvb_get_guint8(tvb, offset);
|
||||
proto_tree_add_item(tree, hf_scsi_modesel_block_descriptor_length8, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
desclen = tvb_get_ntohs(tvb, offset);
|
||||
proto_tree_add_item(tree, hf_scsi_modesel_block_descriptor_length16, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset += 2;
|
||||
tot_len -= 2;
|
||||
|
||||
|
|
Loading…
Reference in New Issue