[openssl] master update

Dr. Paul Dale pauli at openssl.org
Wed Aug 14 22:04:02 UTC 2019


The branch master has been updated
       via  aee6e29f0e88df18ebc21dbcf9d4d5794d7511e0 (commit)
      from  d95422761116791966dcd0dd7035b46795482482 (commit)


- Log -----------------------------------------------------------------
commit aee6e29f0e88df18ebc21dbcf9d4d5794d7511e0
Author: Pauli <paul.dale at oracle.com>
Date:   Mon Aug 12 20:07:39 2019 +1000

    Access data after obtaining the lock not before.
    
    It isn't completely clear that this constitutes a race condition, but it will
    always be conservative to access the locked data after getting the lock.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Bernd Edlinger <bernd.edlinger at hotmail.de>
    (Merged from https://github.com/openssl/openssl/pull/9579)

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

Summary of changes:
 crypto/ex_data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/ex_data.c b/crypto/ex_data.c
index a49aa087c8..cd8e695855 100644
--- a/crypto/ex_data.c
+++ b/crypto/ex_data.c
@@ -49,8 +49,8 @@ static EX_CALLBACKS *get_and_lock(OPENSSL_CTX *ctx, int class_index)
          return NULL;
     }
 
-    ip = &global->ex_data[class_index];
     CRYPTO_THREAD_write_lock(global->ex_data_lock);
+    ip = &global->ex_data[class_index];
     return ip;
 }
 


More information about the openssl-commits mailing list