mirror of
https://github.com/curl/curl.git
synced 2026-08-26 19:43:32 +03:00
parsedate: detect more invalid dates better
This commit is contained in:
parent
8da5da9b65
commit
57d51be60c
3 changed files with 14 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue