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] malloc/hooks.c: Correct check for overflow in memalign_check.


On 9 October 2013 15:15, Alexander Monakov <amonakov@ispras.ru> wrote:
> On Wed, 9 Oct 2013, Will Newton wrote:
>> +  /* Check for overflow.  */
>> +  if (bytes > SIZE_MAX - alignment - MINSIZE)
>
> At this point no upper bound is established on the value of 'alignment', so
> the test may pass when 'alignment' is so large that right-hand side
> overflows.

Thanks for noticing this. If it's ok I'd like to deal with that issue
as a separate patch though.

-- 
Will Newton
Toolchain Working Group, Linaro


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