This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] malloc/hooks.c: Correct check for overflow in memalign_check.
- From: Will Newton <will dot newton at linaro dot org>
- To: Alexander Monakov <amonakov at ispras dot ru>
- Cc: libc-alpha <libc-alpha at sourceware dot org>, Patch Tracking <patches at linaro dot org>
- Date: Wed, 9 Oct 2013 17:19:06 +0100
- Subject: Re: [PATCH] malloc/hooks.c: Correct check for overflow in memalign_check.
- Authentication-results: sourceware.org; auth=none
- References: <52555E49 dot 4050506 at linaro dot org> <alpine dot LNX dot 2 dot 00 dot 1310091807270 dot 15699 at monopod dot intra dot ispras dot ru>
On 9 October 2013 15:15, Alexander Monakov <firstname.lastname@example.org> 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
Thanks for noticing this. If it's ok I'd like to deal with that issue
as a separate patch though.
Toolchain Working Group, Linaro