]> The Tcpdump Group git mirrors - tcpdump/commit
Fix length checking.
authorGuy Harris <[email protected]>
Thu, 18 Dec 2014 23:51:11 +0000 (15:51 -0800)
committerGuy Harris <[email protected]>
Thu, 18 Dec 2014 23:51:11 +0000 (15:51 -0800)
commit743bcecdc92f88b118ec7aac4f68b606601205cc
treeb7797b0e4140a1bf0c2dd134fdc280ba9820b3d5
parentd7516761f9c4877bcb05bb6543be3543e1652498
Fix length checking.

Check both the captured length and the on-the-wire length (the latter
*should* be greater than or equal to the former, but that's not
guaranteed).

Add some additional length checks, so neither caplen nor length
underflow.

If we stop dissecting because the packet is too short, return 1, not 0,
as we've "dissected" what we can; 0 means "this is LLC+SNAP with an OUI
of 0 and an unknown Ethertype".
print-llc.c