summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2016-09-20 17:08:03 +0200
committerAndy Polyakov <appro@openssl.org>2016-09-21 21:10:27 +0200
commite7498968e229a4ec27702a3703826873a279a07b (patch)
treecea073413ec7965a75eca8f8385ec98dd8831b06 /crypto
parent13af417ba4f6b826833d4b1f6caa39c4e0013d6f (diff)
rand/randfile.c: treat empty string in RAND_file_name as error.
Suggested in GH#1589. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 7dc0ad4d6dca81a003be7fa1fbd58a55f4be8646)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/rand/randfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c
index dfec2c7d6b..c96383a431 100644
--- a/crypto/rand/randfile.c
+++ b/crypto/rand/randfile.c
@@ -362,5 +362,5 @@ const char *RAND_file_name(char *buf, size_t size)
return NULL;
}
#endif
- return buf;
+ return buf[0] ? buf : NULL;
}