FW: zdump -v crashes with 64-bit time_t

Olson, Arthur David (NIH/NCI) olsona at dc37a.nci.nih.gov
Mon Jun 14 15:44:09 UTC 2004


Andreas Schwab is not on the time zone mailing list; direct replies
appropriately.

				--ado

-----Original Message-----
From: Andreas Schwab [mailto:schwab at suse.de] 
Sent: Wednesday, June 09, 2004 11:11 AM
To: tz at elsie.nci.nih.gov
Subject: zdump -v crashes with 64-bit time_t


zdump does not cope with gmtime/localtime returning NULL, which can easily
happen on systems having a 64-bit time_t when zdump tries to display the
lowest/highest time_t value.  GNU libc's implementation of gmtime/localtime
returns NULL when tm_year would overflow.  Also cf. the recent discussion on
comp.std.c about asctime/ctime potentially writing beyond the internal
buffer when the year is outside the range [-999, 9999] (although GNU libc's
asctime does not have this particular problem).

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab at suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5 "And
now for something completely different."




More information about the tz mailing list