diff options
author | Richard Levitte <levitte@openssl.org> | 2001-06-05 05:08:26 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2001-06-05 05:08:26 +0000 |
commit | 4ae5099856741dd7cf365dbd2c1df45751dfbf4f (patch) | |
tree | c218683fb5358552e9e1f9ca7a38f4a0045f3914 /crypto/rand/randfile.c | |
parent | 5c36f01000e38d11465259f81fc3c052d00d52e8 (diff) | |
download | openssl-4ae5099856741dd7cf365dbd2c1df45751dfbf4f.tar.gz |
Add changes from the 0.9.6-stable branch.
Diffstat (limited to 'crypto/rand/randfile.c')
-rw-r--r-- | crypto/rand/randfile.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c index 7548ac324c..c2ae28c3a2 100644 --- a/crypto/rand/randfile.c +++ b/crypto/rand/randfile.c @@ -211,6 +211,12 @@ const char *RAND_file_name(char *buf, size_t size) { if (OPENSSL_issetugid() == 0) s=getenv("HOME"); +#ifdef DEFAULT_HOME + if (s == NULL) + { + s = DEFAULT_HOME; + } +#endif if (s != NULL && (strlen(s)+strlen(RFILE)+2 < size)) { strcpy(buf,s); @@ -220,7 +226,7 @@ const char *RAND_file_name(char *buf, size_t size) strcat(buf,RFILE); ret=buf; } - else + else buf[0] = '\0'; /* no file name */ } return(ret); |