Re: [PATCH] execve.2: execve also returns E2BIG if a string is too long

From: Matthew House
Date: Wed Oct 11 2023 - 09:52:44 EST


On Tue, Oct 10, 2023 at 11:51 PM Rik van Riel <riel@xxxxxxxxxxx> wrote:
> Document that if a command line or environment string is too long (> MAX_ARG_STRLEN), execve will also return E2BIG.
>
> Signed-off-by: Rik van Riel <riel@xxxxxxxxxxx>

It might be worth mentioning that strlen(pathname) must also be strictly
less than MAX_ARG_STRLEN, it being subject to the same restrictions as
each of the argv/envp strings.

Thank you,
Matthew House