diff options
| author | Paul Eggert | 2011-06-05 22:57:31 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-05 22:57:31 -0700 |
| commit | 7f9bbdbbd60a3c9052537cd4b65a3a6d959b7746 (patch) | |
| tree | c18ac6758da9fc4180925fa1ca213185a1cc0a3b /src | |
| parent | dfe18f824fd582350f8a55e402f210b40ab74083 (diff) | |
| download | emacs-7f9bbdbbd60a3c9052537cd4b65a3a6d959b7746.tar.gz emacs-7f9bbdbbd60a3c9052537cd4b65a3a6d959b7746.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/ChangeLog | 3 | ||||
| -rw-r--r-- | src/fileio.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4269bf4655b..f86b0decf3c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2011-06-06 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-06-06 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 | Don't assume time_t can fit into int. | 8 | Don't assume time_t can fit into int. |
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)) |