This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] time: Use struct alloc_buffer in __tzfile_read
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org
- Date: Sat, 2 Feb 2019 17:57:20 -0800
- Subject: Re: [PATCH] time: Use struct alloc_buffer in __tzfile_read
- References: <firstname.lastname@example.org>
Florian Weimer wrote:
+ if (alloc_buffer_alloc_array (&buf, __time64_t, num_transitions)
+ != transitions)
+ /* Either the start of the allocation moved unexpectedly
+ (misaligned heap pointer, should not happen), or we had an
+ overflow. */
+ goto lose;
Is this comparison needed? The overflow will be caught later anyway, and the !=
comparison cannot fail.
Otherwise it looks good; thanks.