Skip to content

Commit

Permalink
Check public key is not NULL.
Browse files Browse the repository at this point in the history
CVE-2015-0288
PR#3708

Reviewed-by: Matt Caswell <matt@openssl.org>
  • Loading branch information
snhenson committed Mar 2, 2015
1 parent 437b14b commit 28a00bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crypto/x509/x509_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 28a00bc

Please sign in to comment.