On 10/25/18 8:38 AM, Daniel Fischer wrote:
But if the Qt workaround is disabled, there's a buffer overrun now.
Thanks for catching that; proposed patch attached (and installed into GitHub). Please give it a try. The fix is in the patch's last hunk.
sed -ibak 's/\(WORK_AROUND_QTBUG_53071 = \)true/\1false/' zic.c
That's awkward. The attached patch surrounds the constant's definition with an ifndef so that you don't need to modify the source code to disable the Qt bug workaround.
NB, the allocation of ats as nats * 9 byte at the start of writezone() might not be as intended:
It's intended, though now that you mention it I see that there could be an issue if malloc (N) assumes that an odd-aligned pointer can be returned when N is odd. The C Standard allows this behavior. The attached patch should fix this bug too. Thanks again for your careful analysis of the code.