Files
tor/changes
Nick Mathewson 51e551d383 Detect and handle NULL returns from (gm/local)time_r
These functions can return NULL for otherwise-valid values of
time_t.  Notably, the glibc gmtime manpage says it can return NULL
if the year if greater than INT_MAX, and the windows MSDN gmtime
page says it can return NULL for negative time_t values.

Also, our formatting code is not guaranteed to correctly handle
years after 9999 CE.

This patch tries to correct this by detecting NULL values from
gmtime/localtime_r, and trying to clip them to a reasonable end of
the scale.  If they are in the middle of the scale, we call it a
downright error.

Arguably, it's a bug to get out-of-bounds dates like this to begin
with.  But we've had bugs of this kind in the past, and warning when
we see a bug is much kinder than doing a NULL-pointer dereference.

Boboper found this one too.
2011-04-28 17:12:54 -04:00
..
2011-02-10 17:11:06 -05:00
2011-01-25 17:37:37 -05:00
2011-01-25 18:45:13 -05:00
2011-01-25 17:49:02 -05:00
2010-11-30 19:19:36 -05:00
2011-03-01 10:05:18 +01:00
2011-01-15 19:42:17 +01:00
2011-01-10 12:12:11 -05:00
2011-01-25 18:26:49 -05:00
2011-01-25 15:54:51 -05:00
2011-02-11 17:02:26 +01:00
2011-02-08 09:10:14 -05:00
2011-03-09 16:22:18 -05:00
2011-03-18 17:13:43 +01:00
2011-03-27 05:38:53 +02:00
2011-04-26 15:36:17 +02:00
2011-04-15 05:35:30 +02:00
2011-04-18 13:53:13 -07:00
2011-04-04 03:52:58 -04:00
2011-03-08 18:15:17 -05:00
2011-03-25 16:28:37 -04:00
2011-03-15 09:48:26 -07:00
2010-12-15 22:35:07 -05:00