]> The Tcpdump Group git mirrors - tcpdump/commit
ospf: clean up some length checks.
authorGuy Harris <[email protected]>
Wed, 27 May 2020 05:28:42 +0000 (22:28 -0700)
committerGuy Harris <[email protected]>
Wed, 27 May 2020 05:28:42 +0000 (22:28 -0700)
commita3ad5bb4dc11b7af43f8d3a6225049524e479eef
treec21fd175c9c9f5bc7baeca301a43bb1134620d2d
parentc3564c64966be8362f5ff0e8b91ff26f434ab5fd
ospf: clean up some length checks.

In the loop for LS_OPAQUE_TE_TLV_LINK, loop until the remaining TLV
length is 0; we're already checking, first thing in the loop, that the
remaining length is at least 4, so we can process the T and the L.

For each sub-TLV of LS_OPAQUE_TE_TLV_LINK, make sure the sub-tlV doesn't
go past the end of the TLV.

If we compute the padded TLV or sub-TLV length, redo the check, to make
sure the padded length isn't too big.
print-ospf.c