]> 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)
committermergify-bot <noreply@mergify.com>
Wed, 23 Feb 2022 17:34:57 +0000 (17:34 +0000)
commitb487f0aff030e7164fab973c81174909d0732733
tree241fb6b252f512cc57306da4be06de4f8aee28bc
parentcecb76bd3cdcb5ab6adffac17fe8ef90fafba653
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>
(cherry picked from commit 46da676a62bbf87dc35d46c86c073869b41fae3d)
bfdd/bfd.c