diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2003-11-24 23:50:07 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2003-11-24 23:50:07 +0000 |
commit | c3498f678aaae3dc30b1976af498f9e1b0309b5b (patch) | |
tree | c1622d78e3bb89efec9482c4645faee58fd3d3b6 | |
parent | f0515dad66ab7340674a8695dfd60ffcef6cb5aa (diff) | |
download | busybox-w32-c3498f678aaae3dc30b1976af498f9e1b0309b5b.tar.gz busybox-w32-c3498f678aaae3dc30b1976af498f9e1b0309b5b.tar.bz2 busybox-w32-c3498f678aaae3dc30b1976af498f9e1b0309b5b.zip |
When a size of 0 is passed to copyfd_size, dont do anything, it was
reading untill eof which breaks tar
-rw-r--r-- | libbb/copyfd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libbb/copyfd.c b/libbb/copyfd.c index 62ada8e02..1ef994c98 100644 --- a/libbb/copyfd.c +++ b/libbb/copyfd.c | |||
@@ -78,7 +78,10 @@ extern size_t bb_full_fd_action(int src_fd, int dst_fd, const size_t size, ssize | |||
78 | 78 | ||
79 | extern int bb_copyfd_size(int fd1, int fd2, const off_t size) | 79 | extern int bb_copyfd_size(int fd1, int fd2, const off_t size) |
80 | { | 80 | { |
81 | return(bb_full_fd_action(fd1, fd2, size, bb_full_write)); | 81 | if (size) { |
82 | return(bb_full_fd_action(fd1, fd2, size, bb_full_write)); | ||
83 | } | ||
84 | return(0); | ||
82 | } | 85 | } |
83 | 86 | ||
84 | extern int bb_copyfd_eof(int fd1, int fd2) | 87 | extern int bb_copyfd_eof(int fd1, int fd2) |