From: Tim Kientzle Date: Mon, 19 Sep 2011 04:58:34 +0000 (-0400) Subject: Merge r3722 from trunk: Fixes extraction of Zip entries that use X-Git-Tag: v3.0.4~2^2~169^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32034ea2cd4bde0298f74a760baf7e22ddbc1cfe;p=thirdparty%2Flibarchive.git Merge r3722 from trunk: Fixes extraction of Zip entries that use length-at-end without specifying either the compressed or uncompressed length. In particular, fixes bsdtar extraction of such files. SVN-Revision: 3723 --- diff --git a/libarchive/archive_read_extract.c b/libarchive/archive_read_extract.c index ea44f7b88..009612770 100644 --- a/libarchive/archive_read_extract.c +++ b/libarchive/archive_read_extract.c @@ -108,7 +108,7 @@ archive_read_extract2(struct archive *_a, struct archive_entry *entry, if (r != ARCHIVE_OK) /* If _write_header failed, copy the error. */ archive_copy_error(&a->archive, ad); - else if (archive_entry_size(entry) > 0) + else if (!archive_entry_size_is_set(entry) || archive_entry_size(entry) > 0) /* Otherwise, pour data into the entry. */ r = copy_data(_a, ad); r2 = archive_write_finish_entry(ad);