[tz] zone file format very strict

Paul Eggert eggert at cs.ucla.edu
Fri Apr 1 23:32:40 UTC 2022


On 4/1/22 10:27, Paul Eggert wrote:
>> does not suffer a trailing TAB character, behind the +0430
> I'm not seeing the problem.

Although I'm still not seeing a problem with a trailing TAB, after 
staring at the code a bit I do see problems if the input contains a NUL 
byte, along with misleading diagnostics if the input ends in a 
non-newline and/or has a very long input line. Also, POSIX raised its 
line length limit from 512 to 2048 bytes, and zic's memory allocation 
can be simplified a bit. I installed the attached proposed patches to 
fix the issues I found. However, I don't think these changes will affect 
the problem you mentioned.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-zic-now-checks-input-bytes-more-carefully.patch
Type: text/x-patch
Size: 4012 bytes
Desc: not available
URL: <https://mm.icann.org/pipermail/tz/attachments/20220401/7315fcd8/0001-zic-now-checks-input-bytes-more-carefully.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Simplify-field-memory-allocation-in-zic.patch
Type: text/x-patch
Size: 3491 bytes
Desc: not available
URL: <https://mm.icann.org/pipermail/tz/attachments/20220401/7315fcd8/0002-Simplify-field-memory-allocation-in-zic.patch>


More information about the tz mailing list