From 87b89b799f310bd5ab1dae343b0175f6dd9fd925 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sun, 19 Mar 2000 19:10:03 +0000 Subject: [PATCH] Make sure an error condition is returned if, for some reason, the file couldn't be opened. --- crypto/rand/randfile.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.40.0