Re: [PATCH v2] execve.2: execve also returns E2BIG if a string is too long
From: Rik van Riel
Date: Wed Oct 11 2023 - 12:43:45 EST
On Wed, 2023-10-11 at 17:48 +0200, Alejandro Colomar wrote:
> Hi Rik,
>
> On Wed, Oct 11, 2023 at 10:11:34AM -0400, Rik van Riel wrote:
> > The execve syscall returns -E2BIG in 3 cases:
> > - The total length of the command line arguments and environment is
> > too large.
> > - An argument or environment string is longer than MAX_ARG_STRLEN.
>
> Please mention that this includes the terminating NUL, as Matthew
> confirmed. Otherwise, to user-space programmers, this would usually
> be
> interpreted as `strlen(p) > MAX_ARG_STRLEN`.
>
> An example program that demonstrates the limit would be very
> interesting
> here.
Thank you for the detailed review.
I think all the comments are addressed in version 3.
--
All Rights Reversed.