[PATCH] vfprintf: Fix memory with large width and precision [BZ #19931]
Florian Weimer
fweimer@redhat.com
Fri Apr 15 12:02:00 GMT 2016
On 04/14/2016 06:17 PM, Paul Eggert wrote:
> On 04/14/2016 05:22 AM, Florian Weimer wrote:
>> + /* Deallocate any previously allocated buffer because it is
>> + too small. */
>> + if (__glibc_unlikely (workstart != NULL))
>> + free (workstart);
>> if (__glibc_unlikely (prec >= INT_MAX / sizeof (CHAR_T) - 32))
>
> Why don't we need a 'workstart = NULL' after freeing workstart, which is
> the pattern used elsewhere? If it's not needed here, it'd be helpful to
> have a comment saying why not.
Ugh, right. I swear it was there at some point. I've enhanced the test
to catch this.
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-vfprintf-Fix-memory-with-large-width-and-precision-B.patch
Type: text/x-patch
Size: 6051 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160415/bd340dec/attachment.bin>
More information about the Libc-alpha
mailing list