[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Andy Polyakov appro at openssl.org
Wed Jul 25 14:52:15 UTC 2018


The branch OpenSSL_1_1_0-stable has been updated
       via  1de6818a30fa11350460aa148e1ee30cad0a9b10 (commit)
      from  793e7eafd46a39f6345d7113a517c5ee5c2c6884 (commit)


- Log -----------------------------------------------------------------
commit 1de6818a30fa11350460aa148e1ee30cad0a9b10
Author: Andy Polyakov <appro at openssl.org>
Date:   Fri Jul 20 13:19:11 2018 +0200

    crypto/cryptlib.c: resolve possible race in OPENSSL_isservice.
    
    Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
    (Merged from https://github.com/openssl/openssl/pull/6752)
    
    (cherry picked from commit 9e4a1c3f65863b0175ddc534e232e63c4f82ea5c)

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

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

diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
index d93bcd3..bf73244 100644
--- a/crypto/cryptlib.c
+++ b/crypto/cryptlib.c
@@ -128,10 +128,14 @@ int OPENSSL_isservice(void)
 
     if (_OPENSSL_isservice.p == NULL) {
         HANDLE mod = GetModuleHandle(NULL);
+        FARPROC f;
+
         if (mod != NULL)
-            _OPENSSL_isservice.f = GetProcAddress(mod, "_OPENSSL_isservice");
-        if (_OPENSSL_isservice.p == NULL)
+            f = GetProcAddress(mod, "_OPENSSL_isservice");
+        if (f == NULL)
             _OPENSSL_isservice.p = (void *)-1;
+        else
+            _OPENSSL_isservice.f = f;
     }
 
     if (_OPENSSL_isservice.p != (void *)-1)


More information about the openssl-commits mailing list