| Age | Commit message (Collapse) | Author | Files | Lines |
|
Avoid undefined behavior when serializing malformed PLIST_DATE values
containing NaN, infinity, or values outside the Time64_T range. Add a
shared helper for checked date conversion and use it across writer paths.
|
|
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
|
|
The main benefit of this is to allow date/time values outside of the 32bit time_t
range which is very important on 32bit platforms. But there are also some other
issues that will be fixed with this, for example on macOS, mktime() will not work
for dates < 1902 despite time_t being 64bit.
In the same run this commit will also use a reentrant version of gmtime64_r that
should help in multithreaded scenarios.
Original code taken from: https://github.com/evalEmpire/y2038
|