]> The Tcpdump Group git mirrors - tcpdump/commit
PPP: Fix two loops for undefined behavior at runtime
authorFrancois-Xavier Le Bail <[email protected]>
Mon, 18 Mar 2019 21:51:44 +0000 (22:51 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 18 Mar 2019 22:04:07 +0000 (23:04 +0100)
commitd6ca6f1111973646746ab60fe358983d2b6bff3e
treeb67a7c851bfb10b679463d86fcc338cb54df535b
parent391ad4d31b8d6d72a55735c03efa7626d0f4e52d
PPP: Fix two loops for undefined behavior at runtime

The errors were:
print-ppp.c:518:9: runtime error: unsigned integer overflow: 38 - 230
cannot be represented in type 'unsigned int'
print-ppp.c:1138:63: runtime error: unsigned integer overflow: 204 - 220
cannot be represented in type 'unsigned int'

Add a test case.
print-ppp.c
tests/TESTLIST
tests/ppp-invalid-lengths.out [new file with mode: 0644]
tests/ppp-invalid-lengths.pcap [new file with mode: 0644]