X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/c4f8796bf8bec740621a360eded236d8991ea00f..9c965fd16f876115497ca68eefd9418a68773635:/print-bgp.c diff --git a/print-bgp.c b/print-bgp.c index 5e9582ce..e5512ed8 100644 --- a/print-bgp.c +++ b/print-bgp.c @@ -1037,8 +1037,8 @@ decode_rt_routing_info(netdissect_options *ndo, */ memset(&route_target, 0, sizeof(route_target)); num_octets = (plen + 7) / 8; - ND_TCHECK_LEN(pptr[5], num_octets); - memcpy(&route_target, &pptr[5], num_octets); + ND_TCHECK_LEN(pptr + 5, num_octets); + memcpy(&route_target, pptr + 5, num_octets); /* If mask-len is not on octet boundary, ensure all extra bits are 0 */ if (plen % 8) { ((u_char *)&route_target)[num_octets - 1] &=