diff options
author | Richard Yao <[email protected]> | 2023-03-04 15:53:58 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2023-03-06 15:26:43 -0800 |
commit | 8846139b45ff2ddd416f1a8b6227862e519898fc (patch) | |
tree | f63338522200783237ffeacf85e81b199b2d4696 /module/lua | |
parent | 47119d60eff666b7da4d230054cf8a113baf9b92 (diff) |
SHA2Init() should use signed assertions when checking an enum
The recent 4c5fec01a48acc184614ab8735e6954961990235 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 <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Reported-by: Coverity (CID-1535300)
Closes #14573
Diffstat (limited to 'module/lua')
0 files changed, 0 insertions, 0 deletions