Searched hist:136664 (Results 1 - 1 of 1) sorted by relevance

/freebsd-10.1-release/usr.bin/xargs/
H A Dstrnsubst.cdiff 136664 Mon Oct 18 13:40:47 MDT 2004 cperciva Modify behaviour of `xargs -I` in order to:
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.

Completed in 97 milliseconds