<span style=" font-size:10pt;font-family:sans-serif">Paul,</span><br><br><span style=" font-size:10pt;font-family:sans-serif">Both patches work
as designed on Linux and AIX for me. I have reports that our z/OS build
has hit the same issue. That one will take some time for the fix to percolate
through the build system to validate it; I don't have easy individual access
to z/OS.</span><br><br><span style=" font-size:10pt;font-family:sans-serif">--- <br>Tim McBrayer</span><br><br><br><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">From:
       </span><span style=" font-size:9pt;font-family:sans-serif">"Paul
Eggert" <eggert@cs.ucla.edu></span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">To:
       </span><span style=" font-size:9pt;font-family:sans-serif">"Guy
Harris" <gharris@sonic.net>, "Tim McBrayer" <TMcBrayer@ABINITIO.com></span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Cc:
       </span><span style=" font-size:9pt;font-family:sans-serif">"Time
zone mailing list" <tz@iana.org></span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Date:
       </span><span style=" font-size:9pt;font-family:sans-serif">11/04/2022
09:25 PM</span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Subject:
       </span><span style=" font-size:9pt;font-family:sans-serif">Re:
[tz] Bug in 2022f version of zic.c</span><br><hr noshade><br><br><br><tt><span style=" font-size:10pt">On 2022-11-04 16:11, Guy Harris via
tz wrote:<br><br>> In what cases in zic is emalloc() - or erealloc() - called with 0
as the size argument?<br><br>It's when zic sees a Zone with no continuation lines. I didn't notice <br>the bug in testing, since I don't test with AIX. The portability bug was
<br>triggered by the removal of the Qt bug workaround in tzcode 2022f, which
<br>when combined with the -bslim option introduced in tzcode 2019b means <br>that zic can generate TZif files with no time transitions.<br><br>Thanks for reporting the bug, Tim. I installed the first attached patch;
<br>please give it a try. I think this fixes the only place that might call
<br>malloc(0) or realloc(p, 0).<br><br>It's unfortunate that the C standard allows malloc to return NULL on <br>success, as this complicates error checking. Of course zic.c should be
<br>portable even to platforms that exploit this glitch in C.<br><br><br>> (ecpyalloc() - which should probably be called estrdup() to make it
clearer that it's "strdup() with quit on out-of-memory"<br><br>Good suggestion, thanks. I installed the attached second patch to do that.<br>[attachment "0001-Port-to-AIX-6.1-malloc.patch" deleted by Tim
McBrayer/AbInitio] [attachment "0002-Rename-ecpyalloc-to-estrdup.patch"
deleted by Tim McBrayer/AbInitio] </span></tt><br><br><font face="sans-serif"><span id=ABI-Notice>
<br/> <br/><em style="font-style: normal; font-size: 12pt; font-family: 'Times New Roman';color: black;">NOTICE <span style="font-size: 12pt; font-style: italic; font-family: 'Times New Roman';"> from Ab Initio: This email  (including any attachments) may contain information that is subject to confidentiality obligations or is legally privileged, and sender does not waive confidentiality or privilege. If received in error, please notify the sender, delete this email, and make no further use, disclosure, or distribution. </span></em>
</span></font>