[openssl] openssl-3.0 update

Dr. Paul Dale pauli at openssl.org
Fri Jan 14 06:08:47 UTC 2022


The branch openssl-3.0 has been updated
       via  2ee3e38f8f456db4b5afb023ae0472ff79204369 (commit)
      from  941c877bdb71038f6beeaf416d9b7b7951ff1f19 (commit)


- Log -----------------------------------------------------------------
commit 2ee3e38f8f456db4b5afb023ae0472ff79204369
Author: Pauli <ppzgs1 at gmail.com>
Date:   Thu Jan 13 12:30:59 2022 +1100

    coverity 1497107: dereference after null check
    
    Add null checks to avoid dereferencing a pointer that could be null.
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    Reviewed-by: David von Oheimb <david.von.oheimb at siemens.com>
    (Merged from https://github.com/openssl/openssl/pull/17488)

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

Summary of changes:
 apps/lib/apps.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/apps/lib/apps.c b/apps/lib/apps.c
index 25a6b6bcc3..07dd4550f2 100644
--- a/apps/lib/apps.c
+++ b/apps/lib/apps.c
@@ -696,10 +696,13 @@ int load_cert_certs(const char *uri,
     if (ret) {
         if (pcert != NULL)
             warn_cert(uri, *pcert, 0, vpm);
-        warn_certs(uri, *pcerts, 1, vpm);
+        if (pcerts != NULL)
+            warn_certs(uri, *pcerts, 1, vpm);
     } else {
-        sk_X509_pop_free(*pcerts, X509_free);
-        *pcerts = NULL;
+        if (pcerts != NULL) {
+            sk_X509_pop_free(*pcerts, X509_free);
+            *pcerts = NULL;
+        }
     }
     return ret;
 }


More information about the openssl-commits mailing list