diff options
author | Pauli <paul.dale@oracle.com> | 2020-04-27 01:04:05 +0200 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-04-30 12:21:32 +0200 |
commit | 0e2b6091e90dea687f1b2d336a053484faf225b9 (patch) | |
tree | 2b70b2cdbca1ef2bebf815a471ae111f8d8d2cd8 /providers/implementations/macs | |
parent | coverity 1462562 Dereference before null check (diff) | |
download | openssl-0e2b6091e90dea687f1b2d336a053484faf225b9.tar.xz openssl-0e2b6091e90dea687f1b2d336a053484faf225b9.zip |
coverity 1462564 Improper use of negative value
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11651)
Diffstat (limited to 'providers/implementations/macs')
-rw-r--r-- | providers/implementations/macs/kmac_prov.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/providers/implementations/macs/kmac_prov.c b/providers/implementations/macs/kmac_prov.c index 6feaba7695..451b52460c 100644 --- a/providers/implementations/macs/kmac_prov.c +++ b/providers/implementations/macs/kmac_prov.c @@ -250,6 +250,8 @@ static int kmac_init(void *vmacctx) return 0; 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 */ if (kctx->custom_len == 0) { |