Commit 83a0e901 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

2010-04-02 Chris Allegretta <chrisa@asty.org>

        * files.c (do_writeout): Previous fixes should not cause a crash
          when saving a new file.  Discovered by Mike Frysinger <vapier@gentoo.org>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4494 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent e68616b7
Showing with 6 additions and 2 deletions
+6 -2
2010-04-02 Chris Allegretta <chrisa@asty.org>
* files.c (do_writeout): Previous fixes should not cause a crash
when saving a new file. Discovered by Mike Frysinger <vapier@gentoo.org>.
2010-04-07 Chris Allegretta <chrisa@asty.org> 2010-04-07 Chris Allegretta <chrisa@asty.org>
* doc/man/nano.1,nanorc.5: Add warnings about using backup * doc/man/nano.1,nanorc.5: Add warnings about using backup
mode as root due to the Dan Rosenberg security analysis. mode as root due to the Dan Rosenberg security analysis.
......
...@@ -2136,8 +2136,8 @@ bool do_writeout(bool exiting) ...@@ -2136,8 +2136,8 @@ bool do_writeout(bool exiting)
} }
#ifndef NANO_TINY #ifndef NANO_TINY
if (name_exists && openfile->current_stat && openfile->current_stat->st_mtime < st.st_mtime || if (name_exists && (openfile->current_stat && openfile->current_stat->st_mtime < st.st_mtime ||
openfile->current_stat->st_dev != st.st_dev || openfile->current_stat->st_ino != st.st_ino) { openfile->current_stat->st_dev != st.st_dev || openfile->current_stat->st_ino != st.st_ino)) {
i = do_yesno_prompt(FALSE, i = do_yesno_prompt(FALSE,
_("File was modified since you opened it, continue saving ? ")); _("File was modified since you opened it, continue saving ? "));
if (i == 0 || i == -1) if (i == 0 || i == -1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment