aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-06-01 23:23:20 -0700
committerPaul Eggert2011-06-01 23:23:20 -0700
commit6f9028d2dc58431d00319b4918af325c507b854c (patch)
tree79e7a8938c4a25c32ba909dc79febf99b0d5e041 /src
parent76118f10b098e0cf03050b277401b8646dce5706 (diff)
downloademacs-6f9028d2dc58431d00319b4918af325c507b854c.tar.gz
emacs-6f9028d2dc58431d00319b4918af325c507b854c.zip
* fileio.c (Fverify_visited_file_modtime): Avoid time overflow
if b->modtime has its maximal value.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/fileio.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 44c9db28d58..0d84500e78d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12011-06-02 Paul Eggert <eggert@cs.ucla.edu> 12011-06-02 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
4 if b->modtime has its maximal value.
5
3 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits. 6 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
4 7
5 * lisp.h: Include <intprops.h>, as it'll useful in later changes. 8 * lisp.h: Include <intprops.h>, as it'll useful in later changes.
diff --git a/src/fileio.c b/src/fileio.c
index 94894b97a6e..48dac80a39f 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4960,7 +4960,7 @@ See Info node `(elisp)Modification Time' for more details. */)
4960 if ((st.st_mtime == b->modtime 4960 if ((st.st_mtime == b->modtime
4961 /* If both are positive, accept them if they are off by one second. */ 4961 /* If both are positive, accept them if they are off by one second. */
4962 || (st.st_mtime > 0 && b->modtime > 0 4962 || (st.st_mtime > 0 && b->modtime > 0
4963 && (st.st_mtime == b->modtime + 1 4963 && (st.st_mtime - 1 == b->modtime
4964 || st.st_mtime == b->modtime - 1))) 4964 || st.st_mtime == b->modtime - 1)))
4965 && (st.st_size == b->modtime_size 4965 && (st.st_size == b->modtime_size
4966 || b->modtime_size < 0)) 4966 || b->modtime_size < 0))