summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-08-02 04:10:48 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-08-02 04:10:48 +0000
commit10450f724a372bd0172a18c246034218dd742522 (patch)
tree313f7e46948f503f829f0d654215e47e7cda2452 /lib/libcrypto
parent402a72d96f1acc4066647d8d2b8984d6d16f0063 (diff)
$HOME paranoia: never use getenv("HOME") w/o checking for NULL and non-zero
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/rand/randfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libcrypto/rand/randfile.c b/lib/libcrypto/rand/randfile.c
index 53a75667f49..c6ff27be0ee 100644
--- a/lib/libcrypto/rand/randfile.c
+++ b/lib/libcrypto/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;