aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-06-26 18:11:44 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-26 18:11:44 +0200
commitd0a8a0d31243f2ac798531ced2cca45ddf1fea42 (patch)
treece787a64a86b6bf9dd65a9ab7d38d704b9701c1f /archival
parent894fa0ad62924bcfc2d37e045e36d25ad5784888 (diff)
downloadbusybox-d0a8a0d31243f2ac798531ced2cca45ddf1fea42.tar.gz
tar: fix --to-command wrt short writes
function old new delta bb_copyfd_exact_size 51 98 +47 bb_full_fd_action 362 394 +32 get_header_tar 1546 1558 +12 data_extract_to_command 430 439 +9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 100/0) Total: 100 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival')
-rw-r--r--archival/libunarchive/data_extract_to_command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archival/libunarchive/data_extract_to_command.c b/archival/libunarchive/data_extract_to_command.c
index 983c5301d..53a7217c2 100644
--- a/archival/libunarchive/data_extract_to_command.c
+++ b/archival/libunarchive/data_extract_to_command.c
@@ -108,7 +108,7 @@ void FAST_FUNC data_extract_to_command(archive_handle_t *archive_handle)
close(p[0]);
/* Our caller is expected to do signal(SIGPIPE, SIG_IGN)
* so that we don't die if child don't read all the input: */
- bb_copyfd_exact_size(archive_handle->src_fd, p[1], file_header->size);
+ bb_copyfd_exact_size(archive_handle->src_fd, p[1], -file_header->size);
close(p[1]);
if (safe_waitpid(pid, &status, 0) == -1)