[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

Rich Salz rsalz at openssl.org
Mon Apr 25 15:45:28 UTC 2016


The branch OpenSSL_1_0_2-stable has been updated
       via  d31bc179b3a48351025c55756ce8be82bf9bfa4c (commit)
      from  0b48a24ce993d1a4409d7bde26295f6df0d173cb (commit)


- Log -----------------------------------------------------------------
commit d31bc179b3a48351025c55756ce8be82bf9bfa4c
Author: Rich Salz <rsalz at openssl.org>
Date:   Mon Apr 25 08:56:54 2016 -0400

    Fix NULL deref in apps/pkcs7
    
    Thanks to Brian Carpenter for finding and reporting this.
    
    Reviewed-by: Emilia Käsper <emilia at openssl.org>
    (cherry picked from commit 79356a83b78a2d936dcd022847465d9ebf6c67b1)

-----------------------------------------------------------------------

Summary of changes:
 apps/pkcs7.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/apps/pkcs7.c b/apps/pkcs7.c
index 643507f..b677633 100644
--- a/apps/pkcs7.c
+++ b/apps/pkcs7.c
@@ -235,12 +235,16 @@ int MAIN(int argc, char **argv)
         i = OBJ_obj2nid(p7->type);
         switch (i) {
         case NID_pkcs7_signed:
-            certs = p7->d.sign->cert;
-            crls = p7->d.sign->crl;
+            if (p7->d.sign != NULL) {
+                certs = p7->d.sign->cert;
+                crls = p7->d.sign->crl;
+            }
             break;
         case NID_pkcs7_signedAndEnveloped:
-            certs = p7->d.signed_and_enveloped->cert;
-            crls = p7->d.signed_and_enveloped->crl;
+            if (p7->d.signed_and_enveloped != NULL) {
+                certs = p7->d.signed_and_enveloped->cert;
+                crls = p7->d.signed_and_enveloped->crl;
+            }
             break;
         default:
             break;


More information about the openssl-commits mailing list