]> The Tcpdump Group git mirrors - tcpdump/commit
Add a sanity check on packet header capture length
authorFrancois-Xavier Le Bail <[email protected]>
Thu, 1 Feb 2018 17:54:24 +0000 (18:54 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 1 Feb 2018 17:58:02 +0000 (18:58 +0100)
commit8d814082b7fc4b132aef6189416b7e5ab1a73288
treea8c6ee5320f0295e651a6d95df4d94522a2e1e31
parent5dfebc9722650afa4f77f9b7df8dd646b319085a
Add a sanity check on packet header capture length

The capture length must be <= MAXIMUM_SNAPLEN.

Now a pachet is valid if:
packet length != 0,
capture length != 0,
capture length <= MAXIMUM_SNAPLEN,
packet length >= capture length.

Moreover:
Fix spaces, indentation.
print.c