imap4d: reject invalid month in date2tm()
This commit is contained in:
parent
a48b462e44
commit
07a1df8c3a
1 changed files with 2 additions and 0 deletions
|
@ -235,6 +235,8 @@ date2tm(Tm *tm, char *date)
|
|||
}else{
|
||||
tm->mday = strtoul(flds[1], nil, 10);
|
||||
tm->mon = dateindex(flds[2], monname, 12);
|
||||
if(tm->mon < 0)
|
||||
return nil;
|
||||
tm->year = strtoul(flds[3], nil, 10);
|
||||
if(strlen(flds[3]) > 2)
|
||||
tm->year -= 1900;
|
||||
|
|
Loading…
Reference in a new issue