tcpdump/tests/ripv2-invalid-length.pcap
Francois-Xavier Le Bail 59868ef671 RIP: Fix two loops for undefined behavior at runtime
1) RIPv2
The error was:
print-rip.c:386:9: runtime error: unsigned integer overflow: 16 - 20
cannot be represented in type 'unsigned int'

Without this change the unsigned integer variable 'len' is assigned a
very high value, because of underflow, and the loop continue incorrectly.

Add a test case.

2) RIPv1
Same bugfix, based on a code inspection, so comes without a test case.
2019-03-09 15:13:51 +01:00

250 B