tst-timezone dumps core

Zack Weinberg zack@rabi.phys.columbia.edu
Thu Jul 30 11:35:00 GMT 1998


On 28 Jul 1998 20:25:38 -0700, Ulrich Drepper wrote:
>Zack Weinberg <zack@rabi.phys.columbia.edu> writes:
>
>> For awhile now tst-timezone dumps core in __tzfile_read, in this loop:
>> 
>> 277       for (i = 0; i < num_types; ++i)
>> 278         __tzname[types[i].isdst] = __tzstring (&zone_names[types[i].idx]
>);
>> 
>> num_types is absurdly large, so it runs off the end of the array.
>> Probably the bug is in decode().
>
>Can you evaluate this further?  I cannot see this problem here.

I've tracked it to __tzstring.  Something in there scribbles all over
__tzfile_read's stack frame.  The code in tzset.c is hideous and I am not
surprised it has buffer overruns in it.  It might be an interaction with the
compiler but I think we should try to fix it anyway - a lot of people are
using egcs 1.0.3 out there.

I'll investigate further this evening.

zw



More information about the Libc-hacker mailing list