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");
|
out = fopen(file,"wb");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (out == NULL) goto err;
|
if (out == NULL)
|
||||||
|
{
|
||||||
|
err=1;
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
#ifndef NO_CHMOD
|
#ifndef NO_CHMOD
|
||||||
chmod(file,0600);
|
chmod(file,0600);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user