summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorRob Landley2006-02-13 19:40:43 +0000
committerRob Landley2006-02-13 19:40:43 +0000
commit90632d021cecfb9db88f047ad195f91803b66c4a (patch)
tree7202372409e12a2c7e1770a0d8ce254a15486095 /libbb
parent7bfa88f315d71c7f7a1b76fcec3886c7506aca24 (diff)
downloadbusybox-90632d021cecfb9db88f047ad195f91803b66c4a.zip
busybox-90632d021cecfb9db88f047ad195f91803b66c4a.tar.gz
Bug fix from Kim B. Heino, manifested via:
echo > foo && zip foo.zip foo && ./busybox unzip foo.zip
Diffstat (limited to 'libbb')
-rw-r--r--libbb/copyfd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libbb/copyfd.c b/libbb/copyfd.c
index 0976180..5152531 100644
--- a/libbb/copyfd.c
+++ b/libbb/copyfd.c
@@ -44,6 +44,7 @@ static ssize_t bb_full_fd_action(int src_fd, int dst_fd, size_t size)
break;
}
total += wrote;
+ if (total == size) status = 0;
} else if (xread < 0) {
bb_perror_msg(bb_msg_read_error);
break;