Follow-up Comment #2, patch #5280 (project findutils):
The relevant condition is basically
if (128K + env_size <= ctl->posix_arg_size_max
&& 128K + env_size >= ctl->posix_arg_size_min)
arg_max = 128K + env_size;
... thus find attempts to use 128K + 2*env_size, which can fail
if 128K + 2 * env_size > ARG_MAX.
The first condition is equivalent to
if (128K + env_size <= ARG_MAX - 2K && ...)
So find can fail
if (env_size <= ARG_MAX - 130K && 2*env_size > ARG_MAX - 128K);
ARG_MAX = 128K on Linux, so the bug can't happen on Linux. I don't
know what ARG_MAX is in other operating systems.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?5280>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-findutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-findutils