[openssl] master update

Dr. Paul Dale pauli at openssl.org
Thu Nov 25 00:34:41 UTC 2021


The branch master has been updated
       via  dc7e42c6a12637bae1660561d3f4cef039001475 (commit)
      from  946bc0e3ec19ca019fcfa95f93c37f34e12fe0bd (commit)


- Log -----------------------------------------------------------------
commit dc7e42c6a12637bae1660561d3f4cef039001475
Author: x2018 <xkernel.wang at foxmail.com>
Date:   Tue Nov 23 19:25:43 2021 +0800

    check the return value of OPENSSL_strdup to prevent potential memory access error
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/17110)

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

Summary of changes:
 apps/lib/engine_loader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/lib/engine_loader.c b/apps/lib/engine_loader.c
index 7ea05943f3..aa1bad26a4 100644
--- a/apps/lib/engine_loader.c
+++ b/apps/lib/engine_loader.c
@@ -89,7 +89,7 @@ static OSSL_STORE_LOADER_CTX *engine_open(const OSSL_STORE_LOADER *loader,
         keyid = OPENSSL_strdup(q + 1);
     }
 
-    if (e != NULL)
+    if (e != NULL && keyid != NULL)
         ctx = OSSL_STORE_LOADER_CTX_new(e, keyid);
 
     if (ctx == NULL) {


More information about the openssl-commits mailing list