Skip to content

Commit 28a00bc

Browse files
committed
Check public key is not NULL.
CVE-2015-0288 PR#3708 Reviewed-by: Matt Caswell <matt@openssl.org>
1 parent 437b14b commit 28a00bc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crypto/x509/x509_req.c

+2
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md)
9292
goto err;
9393

9494
pktmp = X509_get_pubkey(x);
95+
if (pktmp == NULL)
96+
goto err;
9597
i = X509_REQ_set_pubkey(ret, pktmp);
9698
EVP_PKEY_free(pktmp);
9799
if (!i)

0 commit comments

Comments
 (0)