summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-02-18 00:34:59 +0000
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-22 01:12:27 +0200
commit89b77050fdffde3f7b75d4106f130614fb8961a6 (patch)
tree1324c971e21d25b7fe71335fc24cf0c7424eca69
parent18c7b49354bd72fdafa77b6b6dbb3b3d3e8a9ae6 (diff)
downloadreplicant_openssl-89b77050fdffde3f7b75d4106f130614fb8961a6.zip
replicant_openssl-89b77050fdffde3f7b75d4106f130614fb8961a6.tar.gz
replicant_openssl-89b77050fdffde3f7b75d4106f130614fb8961a6.tar.bz2
Check public key is not NULL.
CVE-2015-0288 PR#3708 Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 28a00bcd8e318da18031b2ac8778c64147cd54f9)
-rw-r--r--crypto/x509/x509_req.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/x509/x509_req.c b/crypto/x509/x509_req.c
index 48183dc..6876d6c 100644
--- a/crypto/x509/x509_req.c
+++ b/crypto/x509/x509_req.c
@@ -92,6 +92,8 @@ X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md)
goto err;
pktmp = X509_get_pubkey(x);
+ if (pktmp == NULL)
+ goto err;
i=X509_REQ_set_pubkey(ret,pktmp);
EVP_PKEY_free(pktmp);
if (!i) goto err;