diff options
author | Pauli <paul.dale@oracle.com> | 2018-09-24 14:06:45 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2018-09-27 09:26:35 +1000 |
commit | 788d2fa0cf38420fd729b336bdb88d5a6e9d68ac (patch) | |
tree | c10a93bea9838589aed8c3ff5ebfa7fa4d795146 /crypto/engine | |
parent | 2b872562f56b6039179104657edddac22712d994 (diff) |
Merge 1.0.2 setuid calls to getenv(3) safety.
Manual merge of #7047 to 1.0.2-stable.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/7300)
Diffstat (limited to 'crypto/engine')
-rw-r--r-- | crypto/engine/eng_list.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/engine/eng_list.c b/crypto/engine/eng_list.c index 83c95d56f4..9e64b9dd93 100644 --- a/crypto/engine/eng_list.c +++ b/crypto/engine/eng_list.c @@ -62,6 +62,7 @@ * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. */ +#include "cryptlib.h" #include "eng_int.h" /* @@ -369,10 +370,10 @@ ENGINE *ENGINE_by_id(const char *id) */ if (strcmp(id, "dynamic")) { # ifdef OPENSSL_SYS_VMS - if ((load_dir = getenv("OPENSSL_ENGINES")) == 0) + if ((load_dir = ossl_safe_getenv("OPENSSL_ENGINES")) == 0) load_dir = "SSLROOT:[ENGINES]"; # else - if ((load_dir = getenv("OPENSSL_ENGINES")) == 0) + if ((load_dir = ossl_safe_getenv("OPENSSL_ENGINES")) == 0) load_dir = ENGINESDIR; # endif iterator = ENGINE_by_id("dynamic"); |