diff options
author | 2000-08-02 04:10:44 +0000 | |
---|---|---|
committer | 2000-08-02 04:10:44 +0000 | |
commit | 5c85bdada757eb334ff6b780df7b249c004d36c6 (patch) | |
tree | bbeb6cbde8a4549624a488536e3397a07044ec2b /lib/libssl/src | |
parent | update n-rcsids (diff) | |
download | wireguard-openbsd-5c85bdada757eb334ff6b780df7b249c004d36c6.tar.xz wireguard-openbsd-5c85bdada757eb334ff6b780df7b249c004d36c6.zip |
$HOME paranoia: never use getenv("HOME") w/o checking for NULL and non-zero
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/crypto/rand/randfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libssl/src/crypto/rand/randfile.c b/lib/libssl/src/crypto/rand/randfile.c index 53a75667f49..c6ff27be0ee 100644 --- a/lib/libssl/src/crypto/rand/randfile.c +++ b/lib/libssl/src/crypto/rand/randfile.c @@ -230,7 +230,7 @@ const char *RAND_file_name(char *buf, int size) else { s=getenv("HOME"); - if (s == NULL) + if (s == NULL || *s == '\0') ret = RFILE; if (((int)(strlen(s)+strlen(RFILE)+2)) > size) ret=RFILE; |