]> The Tcpdump Group git mirrors - tcpdump/commitdiff
msdp: do some additional bounds checks.
authorGuy Harris <[email protected]>
Wed, 28 Aug 2024 07:09:46 +0000 (00:09 -0700)
committerGuy Harris <[email protected]>
Sun, 8 Sep 2024 23:51:41 +0000 (16:51 -0700)
Make sure we don't run past either 1) the end of the packet data (using
ND_TCHECK_LEN() for fields we don't fetch and print) or 2) the end of
the TLV (with a check of length before fetching the T and L, and checks
of L before fetching any further data).

Don't advance sp past the T and L, or decrement length for the T and L,
before parsing the V, so we don't have to subtract 3 from sp in some
cases.

Add some comments.

Define ND_LONGJMP_FROM_TCHECK to do new-style checks.

(cherry picked from commit 66b6e1e05fc355052b34c8f3635bb696cd18f986)


No differences found