aboutsummaryrefslogtreecommitdiff
path: root/coreutils/tail.c
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-09-30 00:24:21 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-09-30 00:24:21 +0000
commit66c1af9764f06be98d03681e09d29a312566d4f8 (patch)
treece57b2149107a5fb404536be4d035c05690fdac1 /coreutils/tail.c
parent5a10ff61dfa52706db208a3186e8b6c88ac30a52 (diff)
downloadbusybox-w32-66c1af9764f06be98d03681e09d29a312566d4f8.tar.gz
busybox-w32-66c1af9764f06be98d03681e09d29a312566d4f8.tar.bz2
busybox-w32-66c1af9764f06be98d03681e09d29a312566d4f8.zip
Patch from William Barsse to fix a segfault when multiple files are specified.
git-svn-id: svn://busybox.net/trunk/busybox@9287 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to '')
-rw-r--r--coreutils/tail.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/coreutils/tail.c b/coreutils/tail.c
index b18064a38..e3f89d2ee 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -228,6 +228,7 @@ int tail_main(int argc, char **argv)
228 buf = tailbuf; 228 buf = tailbuf;
229 taillen = 0; 229 taillen = 0;
230 seen = 1; 230 seen = 1;
231 newline = 0;
231 232
232 while ((nread = tail_read(fds[i], buf, tailbufsize-taillen)) > 0) { 233 while ((nread = tail_read(fds[i], buf, tailbufsize-taillen)) > 0) {
233 if (from_top) { 234 if (from_top) {