From e18e2786f517df28572247b4eab1de59654b666e Mon Sep 17 00:00:00 2001
From: Kurt Cancemi <kurt@x64Architecture.com>
Date: Wed, 18 Feb 2015 23:11:05 -0500
Subject: [PATCH] Fix NULL pointer dereference in X509_PUBKEY_set()

---
 crypto/asn1/x_pubkey.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/asn1/x_pubkey.c b/crypto/asn1/x_pubkey.c
index 4b68201..d443dd2 100644
--- a/crypto/asn1/x_pubkey.c
+++ b/crypto/asn1/x_pubkey.c
@@ -90,7 +90,7 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey)
 {
     X509_PUBKEY *pk = NULL;
 
-    if (x == NULL)
+    if (x == NULL || pkey == NULL)
         return (0);
 
     if ((pk = X509_PUBKEY_new()) == NULL)
-- 
1.9.3 (Apple Git-50)

