This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix for heap overflow in wscanf (BZ 16618)


On 02/02/2015 01:59 PM, Paul Pluzhnikov wrote:
> On Mon, Feb 2, 2015 at 10:45 AM, Andreas Schwab <schwab@suse.de> wrote:
>                  \
>>> +               __set_errno (ENOMEM);                                     \
>>
>> You already have a meaningful errno from the failed realloc.
> 
> I see. And we are sure that "free(old)" will not touch errno?

Yes, free can never fail. If free were to touch errno it would be a bug,
or would only happen in cases of undefined behaviour.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]