mirror of https://github.com/openssl/openssl.git
Fix coverity CID #1454638 - Dereference after NULL check in EVP_MD_CTX_gettable_params()
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/12628)
This commit is contained in:
parent
10ead93897
commit
825ccf5155
|
|
@ -671,8 +671,10 @@ const OSSL_PARAM *EVP_MD_CTX_gettable_params(EVP_MD_CTX *ctx)
|
|||
{
|
||||
EVP_PKEY_CTX *pctx;
|
||||
|
||||
if (ctx != NULL
|
||||
&& ctx->digest != NULL
|
||||
if (ctx == NULL)
|
||||
return NULL;
|
||||
|
||||
if (ctx->digest != NULL
|
||||
&& ctx->digest->gettable_ctx_params != NULL)
|
||||
return ctx->digest->gettable_ctx_params(
|
||||
ossl_provider_ctx(EVP_MD_provider(ctx->digest)));
|
||||
|
|
|
|||
Loading…
Reference in New Issue