[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Tue Mar 15 16:59:51 UTC 2016


The branch master has been updated
       via  3ddd1d0458b4e90d34379a3019f092d6010e9710 (commit)
      from  e58d91027ad0132289cae5c9960a68f5750ba0ee (commit)


- Log -----------------------------------------------------------------
commit 3ddd1d0458b4e90d34379a3019f092d6010e9710
Author: Emilia Kasper <emilia at openssl.org>
Date:   Tue Mar 15 15:37:51 2016 +0100

    Fix CRYPTO_THREAD_run_once return value checks
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>

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

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

diff --git a/crypto/init.c b/crypto/init.c
index b7e0235..8c59989 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -594,13 +594,13 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
 # ifndef OPENSSL_NO_STATIC_ENGINE
 #  if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_PADLOCK)
     if ((opts & OPENSSL_INIT_ENGINE_PADLOCK)
-            && CRYPTO_THREAD_run_once(&engine_padlock,
-                                      ossl_init_engine_padlock))
+            && !CRYPTO_THREAD_run_once(&engine_padlock,
+                                       ossl_init_engine_padlock))
         return 0;
 #  endif
 #  if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG)
     if ((opts & OPENSSL_INIT_ENGINE_CAPI)
-            && CRYPTO_THREAD_run_once(&engine_capi, ossl_init_engine_capi))
+            && !CRYPTO_THREAD_run_once(&engine_capi, ossl_init_engine_capi))
         return 0;
 #  endif
     if ((opts & OPENSSL_INIT_ENGINE_DASYNC)
@@ -621,7 +621,7 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
 
 #ifndef OPENSSL_NO_COMP
     if ((opts & OPENSSL_INIT_ZLIB)
-            && CRYPTO_THREAD_run_once(&zlib, ossl_init_zlib))
+            && !CRYPTO_THREAD_run_once(&zlib, ossl_init_zlib))
         return 0;
 #endif
 


More information about the openssl-commits mailing list