mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
5578bd8c99
1. Conform to IEEE Std 1003.1-2004, which state that "Constructed arguments cannot grow larger than 255 bytes", and 2. Avoid a buffer overflow. Unfortunately the standard doesn't indicate how xargs is supposed to handle arguments which (with the appropriate substitutions) would grow larger than 255 bytes; this solution handles those by making as many substitutions as possible without overflowing the buffer. OpenBSD's xargs resolves this in a different direction, by making all the substitutions and then silently truncating the resulting string. Since this change may break existing scripts which rely upon the buffer overflow (255 bytes isn't really all that long...) it will not be MFCed. |
||
---|---|---|
.. | ||
Makefile | ||
pathnames.h | ||
strnsubst.c | ||
xargs.1 | ||
xargs.c |