]> git.ipfire.org Git - thirdparty/freeradius-server.git/commit
Switch Coverity-only code to assert (CID #1619299) (#5441)
authorJames Jones <jejones3141@gmail.com>
Sun, 12 Jan 2025 20:48:01 +0000 (14:48 -0600)
committerGitHub <noreply@github.com>
Sun, 12 Jan 2025 20:48:01 +0000 (14:48 -0600)
commit71bba04df2beed3b47da2c3c08b17ea57df3926c
treeed58ac786ed86c9a91b6887bad31bee7d52304f0
parent37a85897b3d3e015808875ceb1b1e12e08e17ee3
Switch Coverity-only code to assert (CID #1619299) (#5441)

fr_nbo_from_uint64v() does not have an error return--it doesn't
need one. The buffers are big enough, the "| 0x80" means it will
always use as least one byte, so fr_high_bit_pos() won't return 0
even if num == 0. So adding a bogus error return check for Coverity
actually misleads Coverity about any call to fr_nbo_from_uint64v(),
making it the probable cause of the CID.

Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
src/lib/util/nbo.h