This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/2] malloc: make malloc fail with requests larger than PTRDIFF_MAX
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: "eggert at cs dot ucla dot edu" <eggert at cs dot ucla dot edu>
- Cc: 'GNU C Library' <libc-alpha at sourceware dot org>, nd <nd at arm dot com>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Joseph Myers <joseph at codesourcery dot com>
- Date: Thu, 27 Dec 2018 16:49:23 +0000
- Subject: Re: [PATCH 2/2] malloc: make malloc fail with requests larger than PTRDIFF_MAX
Hi,
There is no difference between limiting the size to PTRDIFF_MAX or PTRDIFF_MAX-C for C < pagesize()): this is rounded up to PTRDIFF_MAX + 1 anyway. So the true maximum is PTRDIFF_MAX + 1.
Wilco