]> git.puffer.fish Git - mirror/frr.git/commit
bfdd: Fix overflow possibility with time statements
authorDonald Sharp <sharpd@nvidia.com>
Fri, 18 Feb 2022 15:45:46 +0000 (10:45 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 22 Feb 2022 16:11:31 +0000 (11:11 -0500)
commit46da676a62bbf87dc35d46c86c073869b41fae3d
tree738388bfce7c18e7963f8a006346787dc4680afe
parent4d7aae38ab5f88421dea48a6f6541f86ce4cd954
bfdd: Fix overflow possibility with time statements

If time ( a uint64_t ) is large enough doing division
and subtraction can still lead to situations where
the resulting number is greater than a uint32_t.
Just use uint32_t as an intermediate storage spot.
This is unlikely to every occur in a time frame
I could possibly care about but makes Coverity happy.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bfdd/bfd.c