Bug fix from Kim B. Heino, manifested via:
authorRob Landley <rob@landley.net>
Mon, 13 Feb 2006 19:40:43 +0000 (19:40 -0000)
committerRob Landley <rob@landley.net>
Mon, 13 Feb 2006 19:40:43 +0000 (19:40 -0000)
echo > foo && zip foo.zip foo && ./busybox unzip foo.zip

libbb/copyfd.c

index 0976180..5152531 100644 (file)
@@ -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;