Make sure an error condition is returned if, for some reason, the file
couldn't be opened.
This commit is contained in:
parent
f3f3cc0cca
commit
87b89b799f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user