From: Richard Levitte Date: Sun, 19 Mar 2000 19:10:03 +0000 (+0000) Subject: Make sure an error condition is returned if, for some reason, the file X-Git-Tag: OpenSSL_0_9_5a-beta1~5 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=87b89b799f310bd5ab1dae343b0175f6dd9fd925 Make sure an error condition is returned if, for some reason, the file couldn't be opened. --- diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c index 392efddb21..cc73c799fd 100644 --- a/crypto/rand/randfile.c +++ b/crypto/rand/randfile.c @@ -163,7 +163,11 @@ int RAND_write_file(const char *file) out = fopen(file,"wb"); #endif } - if (out == NULL) goto err; + if (out == NULL) + { + err=1; + goto err; + } #ifndef NO_CHMOD chmod(file,0600); #endif