From: Andy Polyakov Date: Tue, 20 Sep 2016 15:08:03 +0000 (+0200) Subject: rand/randfile.c: treat empty string in RAND_file_name as error. X-Git-Tag: OpenSSL_1_1_1-pre1~3480 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7dc0ad4d6dca81a003be7fa1fbd58a55f4be8646;p=openssl rand/randfile.c: treat empty string in RAND_file_name as error. Suggested in GH#1589. Reviewed-by: Rich Salz --- 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; }