From 3d20b3aed58806a346ec7f905fc221a36c3d0b04 Mon Sep 17 00:00:00 2001 From: Peter Avalos Date: Thu, 6 Dec 2007 15:54:28 +0000 Subject: [PATCH] Import libarchive-2.4.5: Fix a bug in handling of "length at end" flags in ZIP files. --- contrib/libarchive-2/NEWS | 20 ++++++++++++++++++++ .../libarchive/archive_read_support_format_zip.c | 5 +++-- contrib/libarchive-2/version | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/contrib/libarchive-2/NEWS b/contrib/libarchive-2/NEWS index d6de37483f..89f907d1d5 100644 --- a/contrib/libarchive-2/NEWS +++ b/contrib/libarchive-2/NEWS @@ -1,4 +1,24 @@ +Dec 04, 2007: libarchive 2.4.5 released +Dec 04, 2007: Fix cpio/test/test_write_odc by setting the umask first. + +Dec 03, 2007: libarchive 2.4.4 released +Dec 03, 2007: New configure options --disable-xattr and --disable-acl, + thanks to Samuli Suominen. + +Dec 03, 2007: libarchive 2.4.3 released +Dec 03, 2007: Thanks to Lapo Luchini for sending me a ZIP file that + libarchive couldn't handle. Fixed a bug in handling of + "length at end" flags in ZIP files. +Dec 03, 2007: Fixed bsdcpio/bsdtar -help tests. +Dec 02, 2007: First cut at real bsdtar test harness. + +Dec 02, 2007: libarchive 2.4.2 released + +Dec 02, 2007: libarchive 2.4.1 released +Dec 02, 2007: Minor fixes, rough cut of mdoc-to-man conversion for + man pages. + Oct 30, 2007: libarchive 2.4.0 released Oct 30, 2007: Minor compile fix thanks to Joerg Schilling. Oct 30, 2007: Only run the format auction once at the beginning of the diff --git a/contrib/libarchive-2/libarchive/archive_read_support_format_zip.c b/contrib/libarchive-2/libarchive/archive_read_support_format_zip.c index f5d97adb06..7dcc4ea2b1 100644 --- a/contrib/libarchive-2/libarchive/archive_read_support_format_zip.c +++ b/contrib/libarchive-2/libarchive/archive_read_support_format_zip.c @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_zip.c,v 1.15 2007/10/12 04:08:28 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_zip.c,v 1.16 2007/12/04 06:32:12 kientzle Exp $"); #ifdef HAVE_ERRNO_H #include @@ -337,7 +337,8 @@ zip_read_file_header(struct archive_read *a, struct archive_entry *entry, zip->entry_offset = 0; /* If there's no body, force read_data() to return EOF immediately. */ - if (zip->entry_bytes_remaining < 1) + if (0 == (zip->flags & ZIP_LENGTH_AT_END) + && zip->entry_bytes_remaining < 1) zip->end_of_entry = 1; /* Set up a more descriptive format name. */ diff --git a/contrib/libarchive-2/version b/contrib/libarchive-2/version index 9183195ace..26f8b8bcdf 100644 --- a/contrib/libarchive-2/version +++ b/contrib/libarchive-2/version @@ -1 +1 @@ -2.4.0 \ No newline at end of file +2.4.5 \ No newline at end of file -- 2.11.4.GIT