[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/40422: struct tm cannot represent full range of 64-bit time_t, breaks mktime(3)
>Synopsis: struct tm cannot represent full range of 64-bit time_t, breaks
>Arrival-Date: Sat Jan 17 14:50:00 +0000 2009
>Originator: Tobias Nygren
"struct tm" cannot represent the full range of times supported by 64-bit
time_t, due to overflow in tm.tm_year around time_t = (1<<57) or so.
Certain libc functions like localtime(3) need to be aware of this and should
return NULL and set errno appropriately if the time is too large to be
This also means mktime(3) is currently broken for all valid input arguments
because of internal conversion of very large values of time_t to struct tm in
Add appropriate range checks.
Main Index |
Thread Index |