aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorPaul Eggert2014-08-03 08:38:52 -0700
committerPaul Eggert2014-08-03 08:38:52 -0700
commit308cc448e5d6ffd44c7ff366a99d34bbfb0e8c4d (patch)
tree04e83c1f35b94135a52711a5934e752fffea5c3d /src/keyboard.c
parent8f88f7d3c5da38cd2d781770b533dc6c93c52d59 (diff)
downloademacs-308cc448e5d6ffd44c7ff366a99d34bbfb0e8c4d.tar.gz
emacs-308cc448e5d6ffd44c7ff366a99d34bbfb0e8c4d.zip
Don't mishandle year-9999 dates.
* lisp/calendar/parse-time.el (parse-time-rules): Allow years up to most-positive-fixnum. * lisp/calendar/time-date.el (date-to-time): Pass "Specified time is not representable" errors through. * lisp/url/url-cookie.el (url-cookie-expired-p): Treat out-of-range expiration dates as if they were far in the future. * src/editfns.c (decode_time_components): Store an invalid timespec on overflow, instead of returning false, so that the caller can distinguish overflow from other errors. (lisp_time_argument, lisp_seconds_argument): If the time is out of range, signal a time overflow instead of an invalid time spec. * src/keyboard.c (decode_timer): Treat time overflow like other timespec errors. Fixes: debbugs:18176
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 81b68ab343c..5c7ad95f5ac 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -4370,8 +4370,9 @@ decode_timer (Lisp_Object timer, struct timespec *result)
4370 if (! NILP (vector[0])) 4370 if (! NILP (vector[0]))
4371 return 0; 4371 return 0;
4372 4372
4373 return decode_time_components (vector[1], vector[2], vector[3], vector[8], 4373 return (decode_time_components (vector[1], vector[2], vector[3], vector[8],
4374 result, 0); 4374 result, 0)
4375 && timespec_valid_p (*result));
4375} 4376}
4376 4377
4377 4378