]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[crypto] Allow for zero-length big integer literals coverity_scan master
authorMichael Brown <mcb30@ipxe.org>
Mon, 29 Dec 2025 14:01:46 +0000 (14:01 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 29 Dec 2025 14:01:46 +0000 (14:01 +0000)
commit7c39c04a537ce29dccc6f2bae9749d1d371429c1
treea6c7e7671d4caa2fb9d772e40462fc2bc36d4208
parent01038893a3b6e98cb41c4033dd2620eb810121e5
[crypto] Allow for zero-length big integer literals

Ensure that zero-length big integer literals are treated as containing
a zero value.  Avoid tests on every big integer arithmetic operation
by ensuring that bigint_required_size() always returns a non-zero
value: the zero-length tests can therefore be restricted to only
bigint_init() and bigint_done().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/include/bits/bigint.h
src/include/ipxe/bigint.h
src/tests/bigint_test.c