aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/parsedate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/parsedate.c b/lib/parsedate.c
index 6865f8e40..62f1a4181 100644
--- a/lib/parsedate.c
+++ b/lib/parsedate.c
@@ -485,6 +485,10 @@ static int parsedate(const char *date, time_t *output)
return PARSEDATE_SOONER;
}
+ if((mdaynum > 31) || (monnum > 11) ||
+ (hournum > 23) || (minnum > 59) || (secnum > 60))
+ return PARSEDATE_FAIL; /* clearly an illegal date */
+
tm.tm_sec = secnum;
tm.tm_min = minnum;
tm.tm_hour = hournum;