Page MenuHomeFreeBSD

localtime: return NULL if time_t out of range of struct tm
ClosedPublic

Authored by emaste on Feb 10 2017, 9:24 PM.
Tags
None
Referenced Files
F85778782: D9534.id25224.diff
Mon, Jun 10, 2:37 PM
Unknown Object (File)
Fri, Jun 7, 3:54 PM
Unknown Object (File)
Tue, Jun 4, 6:17 PM
Unknown Object (File)
Fri, May 31, 2:40 PM
Unknown Object (File)
Tue, May 28, 4:12 AM
Unknown Object (File)
Wed, May 22, 6:22 PM
Unknown Object (File)
Apr 30 2024, 9:16 AM
Unknown Object (File)
Apr 29 2024, 7:33 PM

Details

Summary

Previously we would truncate tm.tm_year for time_ts corresponding to a year that does not fit in int.

This was fixed in tzcode in 2004 but has persisted in our tree rS2708.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste retitled this revision from to localtime: return NULL if time_t out of range of struct tm.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added a reviewer: bapt.
emaste added a subscriber: rafael.espindola_gmail.com.

For reference, this broke the bash-static build with LLD: https://github.com/emaste/freebsd-ports/pull/20

bapt edited edge metadata.
This revision is now accepted and ready to land.Feb 12 2017, 5:44 PM
This revision was automatically updated to reflect the committed changes.