zfs/module/icp/algs/sha2
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
..
sha2_generic.c SHA2Init() should use signed assertions when checking an enum 2023-03-06 15:26:43 -08:00
sha256_impl.c Restore ASMABI and other Unify work 2023-03-06 15:24:05 -08:00
sha512_impl.c Restore ASMABI and other Unify work 2023-03-06 15:24:05 -08:00