diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-10-31 01:05:16 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-10-31 01:05:16 +0100 |
commit | c531b9a3e4a90fd7c91c78a6991e30bfe0134f34 (patch) | |
tree | 63883e7ad41456977664c0a4f2d3b36d980bebd7 /archival/libarchive | |
parent | b076193f741740886a6771cfe7750adb58ce18a0 (diff) | |
download | busybox-w32-c531b9a3e4a90fd7c91c78a6991e30bfe0134f34.tar.gz busybox-w32-c531b9a3e4a90fd7c91c78a6991e30bfe0134f34.tar.bz2 busybox-w32-c531b9a3e4a90fd7c91c78a6991e30bfe0134f34.zip |
bzcat: fix unpacking of more than one file, and unpacking of zero-size bz2. Closes 4393
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libarchive')
-rw-r--r-- | archival/libarchive/decompress_bunzip2.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/archival/libarchive/decompress_bunzip2.c b/archival/libarchive/decompress_bunzip2.c index cd3144743..c4640d489 100644 --- a/archival/libarchive/decompress_bunzip2.c +++ b/archival/libarchive/decompress_bunzip2.c | |||
@@ -752,7 +752,14 @@ unpack_bz2_stream(int src_fd, int dst_fd) | |||
752 | } | 752 | } |
753 | } | 753 | } |
754 | 754 | ||
755 | if (i != RETVAL_LAST_BLOCK) { | 755 | if (i != RETVAL_LAST_BLOCK |
756 | /* Observed case when i == RETVAL_OK: | ||
757 | * "bzcat z.bz2", where "z.bz2" is a bzipped zero-length file | ||
758 | * (to be exact, z.bz2 is exactly these 14 bytes: | ||
759 | * 42 5a 68 39 17 72 45 38 50 90 00 00 00 00). | ||
760 | */ | ||
761 | && i != RETVAL_OK | ||
762 | ) { | ||
756 | bb_error_msg("bunzip error %d", i); | 763 | bb_error_msg("bunzip error %d", i); |
757 | break; | 764 | break; |
758 | } | 765 | } |