This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/3] posix: Remove dynamic memory allocation from execl{e,p}
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Paul Eggert <eggert at cs dot ucla dot edu>, libc-alpha at sourceware dot org
- Date: Fri, 26 Feb 2016 17:13:17 -0300
- Subject: Re: [PATCH 1/3] posix: Remove dynamic memory allocation from execl{e,p}
- Authentication-results: sourceware.org; auth=none
- References: <1456495001-5298-1-git-send-email-adhemerval dot zanella at linaro dot org> <1456495001-5298-2-git-send-email-adhemerval dot zanella at linaro dot org> <56D09DD3 dot 2050601 at cs dot ucla dot edu> <56D0AA3A dot 9020207 at linaro dot org> <56D0B099 dot 4080205 at cs dot ucla dot edu>
On 26-02-2016 17:07, Paul Eggert wrote:
> On 02/26/2016 11:40 AM, Adhemerval Zanella wrote:
>> Indeed, but afaik this code won't execute if argc == INT_MAX (the argument
>> sanity check will make the function with E2BIG).
>
> No, because we add 1 to argc after testing that it is not INT_MAX. So argc can equal INT_MAX after that.
Right, I am assuming you are referring to the potentially overflow in
addition, now the stack allocation. I will change to ptrdiff_t.