]> The Tcpdump Group git mirrors - tcpdump/commitdiff
When parsing information elements, check for the full length beforehand.
authorGuy Harris <[email protected]>
Sat, 19 Apr 2014 02:09:49 +0000 (19:09 -0700)
committerGuy Harris <[email protected]>
Sat, 19 Apr 2014 02:09:49 +0000 (19:09 -0700)
When parsing information elements, first check to make sure we have the
element ID and length, and fetch the length; then check to make sure we
have the entire element, including the information.  Remove those checks
from the handlers for individual elements.

This squelches a Coverity warning (when we check to make sure the length
remaining in the packet is enough for the element ID; the element ID is
one byte, and the loop continues as long as the length is non-zero, so
that's always true in the loop), and simplifies some other code.

Also check for the right length for fixed-length elements while we're at
it.


No differences found