Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/libarchive/dist libarchive-2.8.2:
details: https://anonhg.NetBSD.org/src/rev/7ad2dd6afff1
branches: trunk
changeset: 753015:7ad2dd6afff1
user: joerg <joerg%NetBSD.org@localhost>
date: Sun Mar 14 19:19:45 2010 +0000
description:
libarchive-2.8.2:
- Fix NULL deference for short self-extracting zip archives
- Don't dereference symlinks on Linux when reading ACLs
- Better detection of SHA2 support for old OpenSSL versions
- Fix parsing of input files for bsdtar -T
- Do not leak setup_xattr into the global namespace
- Fix build when an older libarchive is already installed
- Use O_BINARY opening files in bsdtar
- Include missing archive_crc32.h
- Correctly include iconv.h required by libxml2
diffstat:
external/bsd/libarchive/dist/NEWS | 13 +
external/bsd/libarchive/dist/libarchive/archive.h | 4 +-
external/bsd/libarchive/dist/libarchive/archive_crc32.h | 66 ++++++++++
external/bsd/libarchive/dist/libarchive/archive_read_support_format_zip.c | 2 +-
external/bsd/libarchive/dist/libarchive_fe/matching.c | 2 +-
external/bsd/libarchive/dist/tar/write.c | 16 +-
6 files changed, 93 insertions(+), 10 deletions(-)
diffs (195 lines):
diff -r 8f689f372a17 -r 7ad2dd6afff1 external/bsd/libarchive/dist/NEWS
--- a/external/bsd/libarchive/dist/NEWS Sun Mar 14 18:05:07 2010 +0000
+++ b/external/bsd/libarchive/dist/NEWS Sun Mar 14 19:19:45 2010 +0000
@@ -1,3 +1,16 @@
+Mar 14, 2010: libarchive 2.8.2 released
+Mar 12, 2010: Fix NULL deference for short self-extracting zip archives.
+Mar 12, 2010: Don't dereference symlinks on Linux when reading ACLs.
+Mar 07, 2010: Better detction of SHA2 support for old OpenSSL versions.
+Mar 07, 2010: Fix parsing of input files for bsdtar -T.
+Mar 07, 2010: Do not leak setup_xattr into the global namespace.
+
+Mar 06, 2010: libarchive 2.8.1 released
+Mar 06, 2010: Fix build when an older libarchive is already installed
+Mar 03, 2010: Use O_BINARY opening files in bsdtar
+Mar 02, 2010: Include missing archive_crc32.h
+Mar 01, 2010: Correctly include iconv.h required by libxml2.
+
Feb 04, 2010: libarchive 2.8.0 released
Jan 17, 2010: Fix error handling for 'echo nonexistent | cpio -o'
Jan 17, 2010: Don't use futimes() on Cygwin
diff -r 8f689f372a17 -r 7ad2dd6afff1 external/bsd/libarchive/dist/libarchive/archive.h
--- a/external/bsd/libarchive/dist/libarchive/archive.h Sun Mar 14 18:05:07 2010 +0000
+++ b/external/bsd/libarchive/dist/libarchive/archive.h Sun Mar 14 19:19:45 2010 +0000
@@ -129,13 +129,13 @@
* (ARCHIVE_API_VERSION * 1000000 + ARCHIVE_API_FEATURE * 1000)
* #endif
*/
-#define ARCHIVE_VERSION_NUMBER 2008000
+#define ARCHIVE_VERSION_NUMBER 2008002
__LA_DECL int archive_version_number(void);
/*
* Textual name/version of the library, useful for version displays.
*/
-#define ARCHIVE_VERSION_STRING "libarchive 2.8.0"
+#define ARCHIVE_VERSION_STRING "libarchive 2.8.2"
__LA_DECL const char * archive_version_string(void);
#if ARCHIVE_VERSION_NUMBER < 3000000
diff -r 8f689f372a17 -r 7ad2dd6afff1 external/bsd/libarchive/dist/libarchive/archive_crc32.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libarchive/dist/libarchive/archive_crc32.h Sun Mar 14 19:19:45 2010 +0000
@@ -0,0 +1,66 @@
+/*-
+ * Copyright (c) 2009 Joerg Sonnenberger
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD: head/lib/libarchive/archive_crc32.h 201102 2009-12-28 03:11:36Z kientzle $
+ */
+
+#ifndef __LIBARCHIVE_BUILD
+#error This header is only to be used internally to libarchive.
+#endif
+
+/*
+ * When zlib is unavailable, we should still be able to validate
+ * uncompressed zip archives. That requires us to be able to compute
+ * the CRC32 check value. This is a drop-in compatible replacement
+ * for crc32() from zlib. It's slower than the zlib implementation,
+ * but still pretty fast: This runs about 300MB/s on my 3GHz P4
+ * compared to about 800MB/s for the zlib implementation.
+ */
+static unsigned long
+crc32(unsigned long crc, const void *_p, size_t len)
+{
+ unsigned long crc2, b, i;
+ const unsigned char *p = _p;
+ static volatile int crc_tbl_inited = 0;
+ static unsigned long crc_tbl[256];
+
+ if (!crc_tbl_inited) {
+ for (b = 0; b < 256; ++b) {
+ crc2 = b;
+ for (i = 8; i > 0; --i) {
+ if (crc2 & 1)
+ crc2 = (crc2 >> 1) ^ 0xedb88320UL;
+ else
+ crc2 = (crc2 >> 1);
+ }
+ crc_tbl[b] = crc2;
+ }
+ crc_tbl_inited = 1;
+ }
+
+ crc = crc ^ 0xffffffffUL;
+ while (len--)
+ crc = crc_tbl[(crc ^ *p++) & 0xff] ^ (crc >> 8);
+ return (crc ^ 0xffffffffUL);
+}
diff -r 8f689f372a17 -r 7ad2dd6afff1 external/bsd/libarchive/dist/libarchive/archive_read_support_format_zip.c
--- a/external/bsd/libarchive/dist/libarchive/archive_read_support_format_zip.c Sun Mar 14 18:05:07 2010 +0000
+++ b/external/bsd/libarchive/dist/libarchive/archive_read_support_format_zip.c Sun Mar 14 19:19:45 2010 +0000
@@ -210,7 +210,7 @@
/* Get 4k of data beyond where we stopped. */
buff = __archive_read_ahead(a, offset + 4096,
&bytes_avail);
- if (bytes_avail < offset + 1)
+ if (buff == NULL)
break;
p = (const char *)buff + offset;
while (p + 9 < (const char *)buff + bytes_avail) {
diff -r 8f689f372a17 -r 7ad2dd6afff1 external/bsd/libarchive/dist/libarchive_fe/matching.c
--- a/external/bsd/libarchive/dist/libarchive_fe/matching.c Sun Mar 14 18:05:07 2010 +0000
+++ b/external/bsd/libarchive/dist/libarchive_fe/matching.c Sun Mar 14 19:19:45 2010 +0000
@@ -89,7 +89,7 @@
const char *p;
int ret = 0;
- lr = lafe_line_reader(pathname, '\n');
+ lr = lafe_line_reader(pathname, 0);
while ((p = lafe_line_reader_next(lr)) != NULL) {
if (lafe_exclude(matching, p) != 0)
ret = -1;
diff -r 8f689f372a17 -r 7ad2dd6afff1 external/bsd/libarchive/dist/tar/write.c
--- a/external/bsd/libarchive/dist/tar/write.c Sun Mar 14 18:05:07 2010 +0000
+++ b/external/bsd/libarchive/dist/tar/write.c Sun Mar 14 19:19:45 2010 +0000
@@ -95,6 +95,10 @@
/* Fixed size of uname/gname caches. */
#define name_cache_size 101
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
static const char * const NO_NAME = "(noname)";
struct archive_dir_entry {
@@ -210,7 +214,7 @@
r = archive_write_set_compression_xz(a);
break;
case OPTION_LZMA:
- archive_write_set_compression_lzma(a);
+ r = archive_write_set_compression_lzma(a);
break;
case 'z':
r = archive_write_set_compression_gzip(a);
@@ -256,9 +260,9 @@
format = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED;
#if defined(__BORLANDC__)
- bsdtar->fd = open(bsdtar->filename, O_RDWR | O_CREAT);
+ bsdtar->fd = open(bsdtar->filename, O_RDWR | O_CREAT | O_BINARY);
#else
- bsdtar->fd = open(bsdtar->filename, O_RDWR | O_CREAT, 0666);
+ bsdtar->fd = open(bsdtar->filename, O_RDWR | O_CREAT | O_BINARY, 0666);
#endif
if (bsdtar->fd < 0)
lafe_errc(1, errno,
@@ -353,7 +357,7 @@
/* Sanity-test some arguments and the file. */
test_for_append(bsdtar);
- bsdtar->fd = open(bsdtar->filename, O_RDWR);
+ bsdtar->fd = open(bsdtar->filename, O_RDWR | O_BINARY);
if (bsdtar->fd < 0)
lafe_errc(1, errno,
"Cannot open %s", bsdtar->filename);
@@ -843,7 +847,7 @@
#if defined(EXT2_IOC_GETFLAGS) && defined(EXT2_NODUMP_FL)
/* Linux uses ioctl to read flags. */
if (bsdtar->option_honor_nodump) {
- int fd = open(name, O_RDONLY | O_NONBLOCK);
+ int fd = open(name, O_RDONLY | O_NONBLOCK | O_BINARY);
if (fd >= 0) {
unsigned long fflags;
int r = ioctl(fd, EXT2_IOC_GETFLAGS, &fflags);
@@ -913,7 +917,7 @@
if (archive_entry_size(entry) > 0) {
const char *pathname = archive_entry_sourcepath(entry);
- fd = open(pathname, O_RDONLY);
+ fd = open(pathname, O_RDONLY | O_BINARY);
if (fd == -1) {
if (!bsdtar->verbose)
lafe_warnc(errno,
Home |
Main Index |
Thread Index |
Old Index