Avoiding a call of copy_file() with a null pointer.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5352 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
@@ -2007,7 +2007,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
|
||||
}
|
||||
}
|
||||
|
||||
if (copy_file(f_source, f) != 0) {
|
||||
if (f_source == NULL || copy_file(f_source, f) != 0) {
|
||||
statusbar(_("Error writing %s: %s"), tempname,
|
||||
strerror(errno));
|
||||
unlink(tempname);
|
||||
|
||||
Reference in New Issue
Block a user