[PATCH v2] vfprintf stack overflow [BZ #16617]
Florian Weimer
fweimer@redhat.com
Fri Dec 12 10:07:00 GMT 2014
On 12/08/2014 04:59 PM, Florian Weimer wrote:
> On 12/08/2014 04:41 PM, Joseph Myers wrote:
>> On Mon, 8 Dec 2014, Florian Weimer wrote:
>>
>>> + specs = malloc (nspecs_size);
>>> + if (specs == NULL)
>>> + {
>>> + __set_errno (ENOMEM);
>>> + done = -1;
>>> + goto all_done;
>>> + }
>>
>> It looks to me like this will leak the previous copy of specs on
>> allocation failure, if the previous value was also malloced (so you need
>> "specs = old;" or similar here to get the return path to free it if
>> appropriate).
>
> Ugh, thanks, I've made that change. Anything else?
FYI, I plan to commit this in Monday so that this doesn't fall through
the cracks again.
--
Florian Weimer / Red Hat Product Security
More information about the Libc-alpha
mailing list