aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-icmpv6.c
diff options
context:
space:
mode:
authorUli Heilmeier <uh@heilmeier.eu>2017-07-18 20:32:00 +0200
committerMichael Mann <mmann78@netscape.net>2017-07-19 01:56:26 +0000
commitda0ae7e19b0a3514756f6d0a762b480d744425ac (patch)
tree79d8113397321797247d1d0e395ef25bb0a61d07 /epan/dissectors/packet-icmpv6.c
parent0e0c9a1a7a3e4c9a6bb33d65dbc0918184b8fb30 (diff)
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 <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-icmpv6.c')
-rw-r--r--epan/dissectors/packet-icmpv6.c4
1 files changed, 2 insertions, 2 deletions
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) */