"diff" behavior in 1.15.3 and 1.16.0
Denys Vlasenko
vda.linux at googlemail.com
Fri Mar 12 21:17:59 UTC 2010
On Fri, Mar 12, 2010 at 9:18 PM, Chris Metcalf <cmetcalf at tilera.com> wrote:
> The tail.c bug is pretty clearly wrong; I don't know why it isn't seen
> on other platforms. The fix is to guard the call to
> "xwrite(STDOUT_FILENO, buf + nread - nwrite, nwrite)" at
> coreutils/tail.c:244 with an "if (nwrite > 0)", since otherwise the
> third parameter of xwrite() can be negative. Consider count = 50, nread
> = 10 for the first read; the "nwrite -= (count - seen)" at line 232 will
> make nwrite (initialized to the value of nread) negative.
Thanks, I put the fix in 1.16.0 hotfixes dir:
http://busybox.net/downloads/fixes-1.16.0/busybox-1.16.0-tail.patch
--
vda
More information about the busybox
mailing list