svn commit: trunk/busybox/coreutils
vda at busybox.net
vda at busybox.net
Fri Oct 5 19:17:17 UTC 2007
Author: vda
Date: 2007-10-05 12:17:16 -0700 (Fri, 05 Oct 2007)
New Revision: 20183
Log:
tail: sizeof(buf) is sizeof(char*)! must be BUFSIZ
Modified:
trunk/busybox/coreutils/tail.c
Changeset:
Modified: trunk/busybox/coreutils/tail.c
===================================================================
--- trunk/busybox/coreutils/tail.c 2007-10-05 15:27:03 UTC (rev 20182)
+++ trunk/busybox/coreutils/tail.c 2007-10-05 19:17:16 UTC (rev 20183)
@@ -57,7 +57,7 @@
if (sbuf.st_size < current)
lseek(fd, 0, SEEK_SET);
- r = safe_read(fd, buf, count);
+ r = full_read(fd, buf, count);
if (r < 0) {
bb_perror_msg(bb_msg_read_error);
G.status = EXIT_FAILURE;
@@ -271,7 +271,7 @@
if (nfiles > header_threshhold) {
fmt = header_fmt;
}
- while ((nread = tail_read(fds[i], buf, sizeof(buf))) > 0) {
+ while ((nread = tail_read(fds[i], buf, BUFSIZ)) > 0) {
if (fmt) {
tail_xprint_header(fmt, argv[i]);
fmt = NULL;
More information about the busybox-cvs
mailing list