Date: Tue, 20 Dec 2011 20:02:07 +0000 (UTC) From: Martin Matuska <mm@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r228744 - head/lib/libarchive Message-ID: <201112202002.pBKK27sT032639@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mm Date: Tue Dec 20 20:02:07 2011 New Revision: 228744 URL: http://svn.freebsd.org/changeset/base/228744 Log: 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 Modified: head/lib/libarchive/archive_read_extract.c Modified: head/lib/libarchive/archive_read_extract.c ============================================================================== --- head/lib/libarchive/archive_read_extract.c Tue Dec 20 17:44:25 2011 (r228743) +++ head/lib/libarchive/archive_read_extract.c Tue Dec 20 20:02:07 2011 (r228744) @@ -108,7 +108,7 @@ archive_read_extract2(struct archive *_a 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112202002.pBKK27sT032639>