diff options
author | mm <mm@FreeBSD.org> | 2011-12-20 20:02:07 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2011-12-20 20:02:07 +0000 |
commit | 3e7916ec1c37c8aabb4a4dcd644f98e38eff81f1 (patch) | |
tree | 2547c5f59a69b3a06af052ec70fcfb2aafc88b44 /lib/libarchive | |
parent | 0517523a4ff441ede1240cd8858b14e49eecf87b (diff) | |
download | FreeBSD-src-3e7916ec1c37c8aabb4a4dcd644f98e38eff81f1.zip FreeBSD-src-3e7916ec1c37c8aabb4a4dcd644f98e38eff81f1.tar.gz |
Merge vendor revision 3723:
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.
Obtained from: http://code.google.com/p/libarchive
Reported by: Patrick Lamaiziere <patfbsd@davenulle.org> (freebsd-stable@)
MFC after: 1 week
Diffstat (limited to 'lib/libarchive')
-rw-r--r-- | lib/libarchive/archive_read_extract.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libarchive/archive_read_extract.c b/lib/libarchive/archive_read_extract.c index 8ae5dec..5c69f59 100644 --- a/lib/libarchive/archive_read_extract.c +++ b/lib/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); |