[tz] more changes (and a bug fix)

Christos Zoulas christos at zoulas.com
Sat Oct 18 14:49:20 UTC 2014


On Oct 18, 12:49am, eggert at cs.ucla.edu (Paul Eggert) wrote:
-- Subject: Re: [tz] more changes (and a bug fix)

| Thank you for reporting that bug with garbage data.  I found another one while 
| looking into that one, as the code didn't check that the entire tzfile header 
| was read, which meant it could inspect garbage in the header.
| 
| If I understand the errno-related fixes correctly they're trying to report 
| detailed error values about various problems in parsing the TZ value as a POSIX 
| string.  However, the general tzcode philosophy is to prefer the new TZ 
| interpretation first (i.e., read from an installed file somewhere), and to fall 
| back on the POSIX interpretation only of the new interpretation does not work. 
| If both the new and the POSIX interpretations fail, the new interpretation's 
| errno value should suffice, which means there's no need to compute errno values 
| when doing the POSIX interpretation.
| 
| I'm attaching a proposed patch along those lines.  This should also fix the 
| abovementioned bugs.  Plus, it gets rid of some related gotos.

Thanks, looks good. I will import the new code when it is released.

Best,

christos


More information about the tz mailing list