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: DJ Delorie <dj at redhat dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 21 Dec 2018 21:58:26 -0500
- Subject: Re: [PATCH 2/2] malloc: make malloc fail with requests larger than PTRDIFF_MAX
I'm not a fan of removing the existing overflow checks, because malloc
security depends on a very robust logic, and we already have a macro
that detects too-large allocations.
Also, your code does not allow allocations up to PTRDIFF_MAX, but to
some number smaller than that.