additional check in case of non-positive months
This commit is contained in:
1 parent
dfa5fb0358
commit
355bab380c
1 file changed
+2
-2
@@ -383,9 +383,9 @@ time_t asn1_to_time(const chunk_t *utctime, asn1_t type)
|
||||
}
|
||||
|
||||
/* representation of months as 0..11*/
|
||||
if (tm_mon > 12)
|
||||
if (tm_mon < 1 || tm_mon > 12)
|
||||
{
|
||||
return 0; /* error in time format */
|
||||
return 0; /* error in month format */
|
||||
}
|
||||
tm_mon--;
|
||||
|
||||
|
||||
Reference in new issue
Block a user