bug13476-improve-time-handling 951 B

1234567891011121314151617181920
  1. o Minor bugfixes:
  2. - Set the correct day of year value when the system's localtime(_r)
  3. or gmtime(_r) functions fail to set struct tm. Not externally visible.
  4. Fixes bug 13476.
  5. - Avoid unlikely signed integer overflow in tor_timegm on systems with
  6. 32-bit time_t.
  7. Fixes bug 13476.
  8. o Minor enhancements (validation):
  9. - Check all date/time values passed to tor_timegm and parse_rfc1123_time
  10. for validity, taking leap years into account.
  11. Improves HTTP header validation.
  12. Implemented with bug 13476.
  13. - Clamp year values returned by system localtime(_r) and gmtime(_r)
  14. to year 1 in correct_tm. This ensures tor can read any values it
  15. writes out.
  16. Fixes bug 13476.
  17. o Minor enhancements (testing):
  18. - Add unit tests for tor_timegm signed overflow, tor_timegm and
  19. parse_rfc1123_time validity checks, correct_tm year clamping.
  20. Unit tests (visible) fixes in bug 13476.