This change avoids incorrect truncation printing (" [|icmp6]") avoiding
any attempt to get an IPv6 address past the end of the packet data.
It also avoids a pointer overflow with a 32-bit build that stopped IPv6
addresses printing.
(When length is big, e.g. Jumbo Payload).
ND_PRINT(", id 0x%04x",
GET_BE_U_2(dp->icmp6_data16[0]));
- cp = (const u_char *)dp + length;
+ cp = (const u_char *)dp +
+ ND_MIN(length, ND_BYTES_AVAILABLE_AFTER(dp));
p = (const u_char *)(dp + 1);
while (p < cp) {
ND_PRINT(", %s", GET_IP6ADDR_STRING(p));