tcpdump/tests/bgp-ub.pcap
Bill Fenner 5a5646bbc9 Bgp: Fix an undefined behavior when it tries to parse a too-short packet
It's not enough for the *packet* to be able to contain the RD;
the route data also has to be long enough; otherwise, we will
try to shift a negative length left in order to pass it to
bgp_vpn_ip_print()

print-bgp.c:1848:9: runtime error: left shift of negative value -8
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior print-bgp.c:1848:9

[Part of the PR #1012]
2023-08-22 10:58:27 +02:00

4.7 KiB