On Fri, Mar 12, 2010 at 9:18 PM, Chris Metcalf <[email protected]> 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 _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
