From: Guy Harris Date: Wed, 27 May 2020 05:05:17 +0000 (-0700) Subject: icmp6: make opt_len a full-width u_int. X-Git-Tag: tcpdump-4.99-bp~373 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/56504177e8064069b254e510203c738e1db7f129 icmp6: make opt_len a full-width u_int. That way, when it's multiplied by 8 (shifted left 3 positions), the result will be a u_int, as it should be, not a signed int. --- diff --git a/print-icmp6.c b/print-icmp6.c index 4fa35b2e..8bb7242d 100644 --- a/print-icmp6.c +++ b/print-icmp6.c @@ -1429,7 +1429,8 @@ static int icmp6_opt_print(netdissect_options *ndo, const u_char *bp, int resid) { const struct nd_opt_hdr *op; - uint8_t opt_type, opt_len; + uint8_t opt_type; + u_int opt_len; const struct nd_opt_prefix_info *opp; const struct nd_opt_mtu *opm; const struct nd_opt_rdnss *oprd;