mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
Fix coverity CID #1458645 - Dereference before NULL check in rsa_digest_verify_final()
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/12628)
This commit is contained in:
parent
fdf6118b15
commit
51bba73e93
@ -775,10 +775,11 @@ static int rsa_digest_sign_final(void *vprsactx, unsigned char *sig,
|
||||
unsigned char digest[EVP_MAX_MD_SIZE];
|
||||
unsigned int dlen = 0;
|
||||
|
||||
prsactx->flag_allow_md = 1;
|
||||
if (prsactx == NULL || prsactx->mdctx == NULL)
|
||||
if (prsactx == NULL)
|
||||
return 0;
|
||||
prsactx->flag_allow_md = 1;
|
||||
if (prsactx->mdctx == NULL)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* If sig is NULL then we're just finding out the sig size. Other fields
|
||||
* are ignored. Defer to rsa_sign.
|
||||
|
Loading…
Reference in New Issue
Block a user