]> The Tcpdump Group git mirrors - tcpdump/commit
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 22:06:21 +0000 (15:06 -0700)
commit66b6e1e05fc355052b34c8f3635bb696cd18f986
tree78d982fbcd4fe7048dc4fb9ba9da4f0741f12947
parentc226248a44756cc8899564498405f1adcdc69826
msdp: do some additional bounds checks.

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.
print-msdp.c