diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-02-18 00:34:59 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-03-02 15:24:53 +0000 |
commit | 28a00bcd8e318da18031b2ac8778c64147cd54f9 (patch) | |
tree | 6b9d48639cf4c0d3a3823758c6c11375930562de /crypto/x509 | |
parent | 437b14b533fe7f7408e3ebca6d5569f1d3347b1a (diff) |
Check public key is not NULL.
CVE-2015-0288
PR#3708
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/x509_req.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/x509/x509_req.c b/crypto/x509/x509_req.c index bc6e566c95..01795f4b3f 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) |