From e7498968e229a4ec27702a3703826873a279a07b Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Tue, 20 Sep 2016 17:08:03 +0200 Subject: [PATCH] rand/randfile.c: treat empty string in RAND_file_name as error. Suggested in GH#1589. Reviewed-by: Rich Salz (cherry picked from commit 7dc0ad4d6dca81a003be7fa1fbd58a55f4be8646) --- crypto/rand/randfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.34.1