[openssl] OpenSSL_1_1_1-stable update

tmraz at fedoraproject.org tmraz at fedoraproject.org
Fri Mar 20 12:31:41 UTC 2020


The branch OpenSSL_1_1_1-stable has been updated
       via  673692b8d62c8014b70c609caf69a251608303a9 (commit)
      from  c3074077136c698af05ebe57347c186ae15c910a (commit)


- Log -----------------------------------------------------------------
commit 673692b8d62c8014b70c609caf69a251608303a9
Author: FdaSilvaYY <fdasilvayy at gmail.com>
Date:   Sat Apr 6 19:16:59 2019 +1000

    Coverity: fix two minor NPD issues.
    Found by Coverity.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Tim Hudson <tjh at openssl.org>
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/8274)
    
    (cherry picked from commit 23dc8feba817560485da00d690d7b7b9e5b15682)

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

Summary of changes:
 crypto/conf/conf_lib.c | 6 ++++--
 crypto/ex_data.c       | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/crypto/conf/conf_lib.c b/crypto/conf/conf_lib.c
index 0b7dd26d63..c278d87091 100644
--- a/crypto/conf/conf_lib.c
+++ b/crypto/conf/conf_lib.c
@@ -356,8 +356,10 @@ OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void)
 {
     OPENSSL_INIT_SETTINGS *ret = malloc(sizeof(*ret));
 
-    if (ret != NULL)
-        memset(ret, 0, sizeof(*ret));
+    if (ret == NULL)
+        return NULL;
+
+    memset(ret, 0, sizeof(*ret));
     ret->flags = DEFAULT_CONF_MFLAGS;
 
     return ret;
diff --git a/crypto/ex_data.c b/crypto/ex_data.c
index 22f3b70edf..3d13901fc9 100644
--- a/crypto/ex_data.c
+++ b/crypto/ex_data.c
@@ -235,7 +235,7 @@ int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad)
         return 0;
     }
     for (i = 0; i < mx; i++) {
-        if (storage[i] && storage[i]->new_func) {
+        if (storage[i] != NULL && storage[i]->new_func != NULL) {
             ptr = CRYPTO_get_ex_data(ad, i);
             storage[i]->new_func(obj, ptr, ad, i,
                                  storage[i]->argl, storage[i]->argp);
@@ -299,7 +299,7 @@ int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
 
     for (i = 0; i < mx; i++) {
         ptr = CRYPTO_get_ex_data(from, i);
-        if (storage[i] && storage[i]->dup_func)
+        if (storage[i] != NULL && storage[i]->dup_func != NULL)
             if (!storage[i]->dup_func(to, from, &ptr, i,
                                       storage[i]->argl, storage[i]->argp))
                 goto err;


More information about the openssl-commits mailing list