mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-04-27 18:24:37 +00:00
coverity 1462580 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:
parent
209c3d3ef6
commit
206da660a3
@ -55,6 +55,8 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
|
||||
j = EVP_MD_block_size(md);
|
||||
if (!ossl_assert(j <= (int)sizeof(keytmp)))
|
||||
return 0;
|
||||
if (j < 0)
|
||||
return 0;
|
||||
if (j < len) {
|
||||
if (!EVP_DigestInit_ex(ctx->md_ctx, md, impl)
|
||||
|| !EVP_DigestUpdate(ctx->md_ctx, key, len)
|
||||
|
Loading…
x
Reference in New Issue
Block a user