]> git.puffer.fish Git - mirror/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)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 17 Jan 2025 15:16:48 +0000 (10:16 -0500)
commit283cc511781f9e076baf8564dae234de52cb290a
treee2b6a6bec8f270264a69a761eafee01c8f1e71c7
parent705e6f881b34079a0e87452961b02011a5f1e044
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>
ospfd/ospf_api.c