mirror_zfs/module/icp/algs
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
..
aes Unify Assembler files between Linux and Windows 2023-01-17 11:09:19 -08:00
blake3 Restore ASMABI and other Unify work 2023-03-06 15:24:05 -08:00
edonr Fix Clang 15 compilation errors 2022-11-30 13:46:26 -08:00
modes icp: Prevent compilers from optimizing away memset() in gcm_clear_ctx() 2023-02-28 17:28:50 -08:00
sha2 SHA2Init() should use signed assertions when checking an enum 2023-03-06 15:26:43 -08:00
skein Fix Clang 15 compilation errors 2022-11-30 13:46:26 -08:00