diff options
author | Dylan Ulis <daulis0@gmail.com> | 2019-04-16 18:02:16 -0400 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2019-04-17 04:35:08 +0000 |
commit | 7a89e6ad5656e677976062b750acebf16b99c393 (patch) | |
tree | ba9426d6e63f1c4e9fda9c5d311a85da6364e85c /epan/dissectors | |
parent | da848399efbc7107b9c21bbab7e9532f1a16d584 (diff) |
CIP Security: Fix some off by 1
Some offsets were not incremented after being read, but the next field
assumed it was incremented.
Change-Id: Ifb523bc37f454cfc76d077d34c3efa2663fb6b9e
Reviewed-on: https://code.wireshark.org/review/32873
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-enip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c index b663728f97..18348ef335 100644 --- a/epan/dissectors/packet-enip.c +++ b/epan/dissectors/packet-enip.c @@ -1849,6 +1849,8 @@ dissect_eip_security_avail_cipher_suites(packet_info *pinfo, proto_tree *tree, p } proto_tree_add_item_ret_uint(tree, hf_eip_security_num_avail_cipher_suites, tvb, offset, 1, ENC_NA, &num_suites); + offset++; + for (i = 0; i < num_suites; i++) { proto_tree_add_item(tree, hf_eip_security_avail_cipher_suite, tvb, offset, 2, ENC_BIG_ENDIAN); @@ -1872,6 +1874,8 @@ dissect_eip_security_allow_cipher_suites(packet_info *pinfo, proto_tree *tree, p } proto_tree_add_item_ret_uint(tree, hf_eip_security_num_allow_cipher_suites, tvb, offset, 1, ENC_NA, &num_suites); + offset++; + for (i = 0; i < num_suites; i++) { proto_tree_add_item(tree, hf_eip_security_allow_cipher_suite, tvb, offset, 2, ENC_BIG_ENDIAN); |