]> git.puffer.fish Git - matthieu/frr.git/commit
ospfd: Fix Coverity SA #1617470, 76 and 78
authorDonald Sharp <sharpd@nvidia.com>
Wed, 15 Jan 2025 16:16:10 +0000 (11:16 -0500)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Thu, 6 Feb 2025 16:16:48 +0000 (16:16 +0000)
commit01af91e5ff670c3fecda08742c0b23dfb5477d8b
tree19a890d4599eae2be478665c2c2ac8c3896651cf
parent62e01a8982a3f0134e717f255dd97e21c0a4097e
ospfd: Fix Coverity SA #1617470, 76 and 78

msg_new takes a uint16_t, the length passed
down variable is a unsigned int, thus 32 bit.
It's possible, but highly unlikely, that the
msglen could be greater than 16 bit.
Let's just add some checks to ensure that
this could not happen.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 283cc511781f9e076baf8564dae234de52cb290a)
ospfd/ospf_api.c