summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2019-11-20 13:14:39 +1000
committerPauli <paul.dale@oracle.com>2019-11-21 14:34:55 +1000
commitab5c77b4766e0992751d86560193ca42b49cf316 (patch)
treee3a4181198034b5a1e0c1b7874b742677d1e38f0
parent9bada854de16bcc1a9dc199b4b352b19ab6897fc (diff)
EVP p_lib: Add NULL check to EVP_PKEY_missing_parameters.
Check for NULL and return error if so. This can possibly be called from apps/ca.c with a NULL argument. Reviewed-by: Paul Yang <kaishen.yy@antfin.com> (Merged from https://github.com/openssl/openssl/pull/10474)
-rw-r--r--crypto/evp/p_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c
index 0e93786c82..759fb95401 100644
--- a/crypto/evp/p_lib.c
+++ b/crypto/evp/p_lib.c
@@ -105,7 +105,7 @@ int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from)
int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey)
{
- if (pkey->ameth && pkey->ameth->param_missing)
+ if (pkey != NULL && pkey->ameth && pkey->ameth->param_missing)
return pkey->ameth->param_missing(pkey);
return 0;
}