projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
793e7ea
)
crypto/cryptlib.c: resolve possible race in OPENSSL_isservice.
author
Andy Polyakov
<appro@openssl.org>
Fri, 20 Jul 2018 11:19:11 +0000
(13:19 +0200)
committer
Andy Polyakov
<appro@openssl.org>
Wed, 25 Jul 2018 14:49:51 +0000
(16:49 +0200)
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/6752)
(cherry picked from commit
9e4a1c3f65863b0175ddc534e232e63c4f82ea5c
)
crypto/cryptlib.c
patch
|
blob
|
history
diff --git
a/crypto/cryptlib.c
b/crypto/cryptlib.c
index d93bcd357b6303b2cc8fdace66aa0c9f5a9198dd..bf7324439485e12faf5c17951fc660ab381bac59 100644
(file)
--- 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)