zfs/module/icp
Richard Yao 8846139b45 SHA2Init() should use signed assertions when checking an enum
The recent 4c5fec01a4 commit caused
Coverity to report that ASSERT3U(algotype, >=, SHA256_MECH_INFO_TYPE);
is always true. That is because the signed algotype and signed
SHA256_MECH_INFO_TYPE values were cast to unsigned types. To fix this,
we switch the assertions to use ASSERT3S(), which retains the signedness
of the original values for the comparison.

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reported-by: Coverity (CID-1535300)
Closes #14573
2023-03-06 15:26:43 -08:00
..
algs SHA2Init() should use signed assertions when checking an enum 2023-03-06 15:26:43 -08:00
api Cleanup: Remove unnecessary explicit casts of pointers from allocators 2023-01-12 15:59:12 -08:00
asm-aarch64 Add generic implementation handling and SHA2 impl 2023-03-02 13:52:21 -08:00
asm-arm/sha2 Add generic implementation handling and SHA2 impl 2023-03-02 13:52:21 -08:00
asm-ppc64 Add generic implementation handling and SHA2 impl 2023-03-02 13:52:21 -08:00
asm-x86_64 Restore ASMABI and other Unify work 2023-03-06 15:24:05 -08:00
core Cleanup: Remove unneeded semicolons 2023-01-12 16:00:30 -08:00
include Add generic implementation handling and SHA2 impl 2023-03-02 13:52:21 -08:00
io Add generic implementation handling and SHA2 impl 2023-03-02 13:52:21 -08:00
spi Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
illumos-crypto.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00