diff options
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c index 5fa0896ae5..a03a576321 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1451,6 +1451,8 @@ parse_http_time(const char *date, struct tm *tm) month[3] = '\0'; /* Okay, now decode the month. */ + /* set tm->tm_mon to dummy value so the check below fails. */ + tm->tm_mon = -1; for (i = 0; i < 12; ++i) { if (!strcasecmp(MONTH_NAMES[i], month)) { tm->tm_mon = i; |