From da0ae7e19b0a3514756f6d0a762b480d744425ac Mon Sep 17 00:00:00 2001 From: Uli Heilmeier Date: Tue, 18 Jul 2017 20:32:00 +0200 Subject: ICMPv6: Fix data length for unknown option The length value includes the Type and Length fields. Therefore the length of the Data field is two bytes smaller. Change-Id: I93878a016ace083f4e766bee6e16e301d6903967 Reviewed-on: https://code.wireshark.org/review/22702 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-icmpv6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-icmpv6.c') diff --git a/epan/dissectors/packet-icmpv6.c b/epan/dissectors/packet-icmpv6.c index 2d72aab033..c68445d39f 100644 --- a/epan/dissectors/packet-icmpv6.c +++ b/epan/dissectors/packet-icmpv6.c @@ -2415,8 +2415,8 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree "Dissector for ICMPv6 Option (%d)" " code not implemented, Contact Wireshark developers" " if you want this supported", opt_type); - proto_tree_add_item(icmp6opt_tree, hf_icmpv6_data, tvb, opt_offset, opt_len, ENC_NA); - opt_offset += opt_len; + proto_tree_add_item(icmp6opt_tree, hf_icmpv6_data, tvb, opt_offset, opt_len-2, ENC_NA); + opt_offset += opt_len - 2; break; } /* switch (opt_type) */ -- cgit v1.2.3