diff options
author | Richard Levitte <levitte@openssl.org> | 2000-03-19 19:10:03 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2000-03-19 19:10:03 +0000 |
commit | 87b89b799f310bd5ab1dae343b0175f6dd9fd925 (patch) | |
tree | d78f5a44d6c1746def742f264ba94b04a8fd7d09 | |
parent | f3f3cc0ccaf528767942e6d151383209394cd7c4 (diff) | |
download | openssl-87b89b799f310bd5ab1dae343b0175f6dd9fd925.tar.gz |
Make sure an error condition is returned if, for some reason, the file
couldn't be opened.
-rw-r--r-- | crypto/rand/randfile.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 |