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>
This commit is contained in:
Dylan Ulis 2019-04-16 18:02:16 -04:00 committed by Alexis La Goutte
parent da848399ef
commit 7a89e6ad56
1 changed files with 4 additions and 0 deletions

View File

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