summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2022-01-19 19:28:02 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2022-01-19 19:32:01 +0100
commit1742c5e687cf6974c1c9c46e045291f879a79e27 (patch)
tree5445103ab9fb52fd421c17c7ffcc64949d7bd875
parent87aafd5d45f064412ff977e4045b7f603ba092c6 (diff)
sfeed: parsetime: allow leap second like 23:59:60
Specified in RFC2822 Section 3.3. Date and Time Specification "[...] the time-of-day MUST be in the range 00:00:00 through 23:59:60 (the number of seconds allowing for a leap second; see [STD12]) [...]" To test: <entry><updated>2016-12-31T23:59:60Z</updated></entry>
-rw-r--r--sfeed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sfeed.c b/sfeed.c
index 2509562..e34e90a 100644
--- a/sfeed.c
+++ b/sfeed.c
@@ -647,7 +647,7 @@ parsetime(const char *s, time_t *tp)
va[2] < 1 || va[2] > 31 ||
va[3] < 0 || va[3] > 23 ||
va[4] < 0 || va[4] > 59 ||
- va[5] < 0 || va[5] > 59)
+ va[5] < 0 || va[5] > 60) /* allow leap second */
return -1;
if (tp)