diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2018-04-03 23:47:10 +0200 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2018-04-04 14:50:50 +0200 |
commit | 6b49b30811f4afa0340342af9400b8d0357b5291 (patch) | |
tree | 063c1c45e786514b7aeec7f87d012ce0776fcc56 /crypto/init.c | |
parent | 284f4f6b70998b2b46dc74c3003c82cb1db0e742 (diff) |
Prevent a possible recursion in ERR_get_state and fix the problem that
was pointed out in commit aef84bb4efbddfd95d042f3f5f1d362ed7d4faeb
differently.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5863)
Diffstat (limited to 'crypto/init.c')
-rw-r--r-- | crypto/init.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/crypto/init.c b/crypto/init.c index 37b7a7c72e..c79c32c17a 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -540,18 +540,8 @@ void OPENSSL_cleanup(void) */ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings) { - static int stoperrset = 0; - if (stopped) { - if (!stoperrset) { - /* - * We only ever set this once to avoid getting into an infinite - * loop where the error system keeps trying to init and fails so - * sets an error etc - */ - stoperrset = 1; - CRYPTOerr(CRYPTO_F_OPENSSL_INIT_CRYPTO, ERR_R_INIT_FAIL); - } + CRYPTOerr(CRYPTO_F_OPENSSL_INIT_CRYPTO, ERR_R_INIT_FAIL); return 0; } |