svn commit: r228744 - head/lib/libarchive

Martin Matuska mm at FreeBSD.org
Tue Dec 20 20:02:08 UTC 2011


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 at 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);


More information about the svn-src-head mailing list