From 6f9028d2dc58431d00319b4918af325c507b854c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 1 Jun 2011 23:23:20 -0700 Subject: [PATCH] * fileio.c (Fverify_visited_file_modtime): Avoid time overflow if b->modtime has its maximal value. --- src/ChangeLog | 3 +++ src/fileio.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 44c9db28d58..0d84500e78d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-06-02 Paul Eggert + * fileio.c (Fverify_visited_file_modtime): Avoid time overflow + if b->modtime has its maximal value. + * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits. * lisp.h: Include , 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. */) if ((st.st_mtime == b->modtime /* If both are positive, accept them if they are off by one second. */ || (st.st_mtime > 0 && b->modtime > 0 - && (st.st_mtime == b->modtime + 1 + && (st.st_mtime - 1 == b->modtime || st.st_mtime == b->modtime - 1))) && (st.st_size == b->modtime_size || b->modtime_size < 0)) -- 2.39.5