Fix for d2i_ASN1_bytes and stop PKCS#7 routines crashing is signed message
[openssl.git] / crypto / x509 / x509_cmp.c
index be2997909204b316b4d25930f68217cd58f4aa0a..6213ec2f8d90acc7a66b80285fbb4032d6c02a28 100644 (file)
@@ -207,6 +207,8 @@ X509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk, X509_NAME *name,
        X509_CINF cinf;
        X509 x,*x509=NULL;
 
+       if(!sk) return NULL;
+
        x.cert_info= &cinf;
        cinf.serialNumber=serial;
        cinf.issuer=name;