diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2016-08-23 19:41:46 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-08-24 07:23:53 +0000 |
commit | 20908f55f6c93fb79fbd39e60affa2d4428b4951 (patch) | |
tree | 64fee7a83310f33bf00a5782c4e9e39577205f8d /epan/dissectors/packet-scsi.c | |
parent | 5213496250aceff086404c568e3718ebc0060934 (diff) |
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>
Diffstat (limited to 'epan/dissectors/packet-scsi.c')
-rw-r--r-- | epan/dissectors/packet-scsi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-scsi.c b/epan/dissectors/packet-scsi.c index 7b5a526db4..36a7401348 100644 --- a/epan/dissectors/packet-scsi.c +++ b/epan/dissectors/packet-scsi.c @@ -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; |