[openssl] OpenSSL_1_1_1-stable update

Dr. Paul Dale pauli at openssl.org
Thu Nov 21 04:33:06 UTC 2019


The branch OpenSSL_1_1_1-stable has been updated
       via  333853fae6512ff71bf1b6da951ca0069c878c92 (commit)
      from  cf5afa4d28bda819f431aa6d933413a72172ce4b (commit)


- Log -----------------------------------------------------------------
commit 333853fae6512ff71bf1b6da951ca0069c878c92
Author: Pauli <paul.dale at oracle.com>
Date:   Wed Nov 20 13:07:04 2019 +1000

    Engine: Add NULL check.
    
    Add NULL check for return from pkey_asn1_meths.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/10473)
    
    (cherry picked from commit 9bada854de16bcc1a9dc199b4b352b19ab6897fc)

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

Summary of changes:
 crypto/engine/tb_asnmth.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/engine/tb_asnmth.c b/crypto/engine/tb_asnmth.c
index 130b289fec..72850b9398 100644
--- a/crypto/engine/tb_asnmth.c
+++ b/crypto/engine/tb_asnmth.c
@@ -147,7 +147,8 @@ const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e,
     nidcount = e->pkey_asn1_meths(e, NULL, &nids, 0);
     for (i = 0; i < nidcount; i++) {
         e->pkey_asn1_meths(e, &ameth, NULL, nids[i]);
-        if (((int)strlen(ameth->pem_str) == len)
+        if (ameth != NULL
+            && ((int)strlen(ameth->pem_str) == len)
             && strncasecmp(ameth->pem_str, str, len) == 0)
             return ameth;
     }


More information about the openssl-commits mailing list