diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2019-03-08 18:04:43 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2019-03-09 15:13:51 +0100 |
commit | 59868ef671124943e6bcdc2922bb0522d8312d08 (patch) | |
tree | bf8a3d79bf3344aa3771f9462b46b793390cbcee /tests/ripv2-invalid-length.pcap | |
parent | 8e41caf1e74249cd91906c66e28ba476f4789137 (diff) | |
download | tcpdump-59868ef671124943e6bcdc2922bb0522d8312d08.tar.gz |
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.
Diffstat (limited to 'tests/ripv2-invalid-length.pcap')
-rw-r--r-- | tests/ripv2-invalid-length.pcap | bin | 0 -> 250 bytes |
1 files changed, 0 insertions, 0 deletions
diff --git a/tests/ripv2-invalid-length.pcap b/tests/ripv2-invalid-length.pcap Binary files differnew file mode 100644 index 00000000..db475f24 --- /dev/null +++ b/tests/ripv2-invalid-length.pcap |