coverity 1462564 Improper use of negative value

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11651)
This commit is contained in:
Pauli 2020-04-27 09:04:05 +10:00
parent 437e36aed5
commit 0e2b6091e9

View File

@ -250,6 +250,8 @@ static int kmac_init(void *vmacctx)
return 0; return 0;
block_len = EVP_MD_block_size(ossl_prov_digest_md(&kctx->digest)); block_len = EVP_MD_block_size(ossl_prov_digest_md(&kctx->digest));
if (block_len < 0)
return 0;
/* Set default custom string if it is not already set */ /* Set default custom string if it is not already set */
if (kctx->custom_len == 0) { if (kctx->custom_len == 0) {