head 1.14; access; symbols OPENPKG_2_STABLE_MP:1.3 OPENPKG_2_STABLE:1.3.0.2 OPENPKG_E1_MP_HEAD:1.4 OPENPKG_E1_MP:1.4 OPENPKG_CW_FP:1.1; locks; strict; comment @# @; 1.14 date 2009.08.05.17.17.26; author rse; state Exp; branches; next 1.13; commitid eYCZyTI2tW8yUwYt; 1.13 date 2009.04.17.12.43.16; author rse; state Exp; branches; next 1.12; commitid DwpSOjAZdbjKVmKt; 1.12 date 2009.03.04.22.01.34; author rse; state Exp; branches; next 1.11; commitid dOGXt1p6au7XqLEt; 1.11 date 2009.01.16.23.30.47; author thl; state Exp; branches; next 1.10; commitid oZoejSAWYYRdrJyt; 1.10 date 2008.12.29.08.13.57; author rse; state Exp; branches; next 1.9; commitid BUUGZUupPUuzWkwt; 1.9 date 2008.07.04.07.47.21; author rse; state Exp; branches; next 1.8; commitid fdEOnQXuVhVaws9t; 1.8 date 2008.04.08.21.14.35; author rse; state Exp; branches; next 1.7; commitid 4yTKgOQuldJuMlYs; 1.7 date 2008.03.31.17.45.28; author rse; state Exp; branches; next 1.6; commitid MfiEYhkN8UdHSiXs; 1.6 date 2008.03.31.06.34.25; author rse; state Exp; branches; next 1.5; commitid u0AknH2QxSeuafXs; 1.5 date 2008.03.29.21.38.58; author rse; state Exp; branches; next 1.4; commitid 8nRx1LNnZXZMe4Xs; 1.4 date 2006.12.04.16.50.05; author cs; state dead; branches; next 1.3; commitid 5eolk0iFyPHg6eXr; 1.3 date 2006.11.08.16.09.54; author rse; state Exp; branches 1.3.2.1; next 1.2; commitid hc6l1JBjMTziISTr; 1.2 date 2005.11.08.07.07.13; author rse; state dead; branches; next 1.1; commitid CGIWsN80JvnxrV8r; 1.1 date 2005.01.23.19.22.22; author rse; state Exp; branches; next ; 1.3.2.1 date 2006.11.08.16.09.54; author rse; state dead; branches; next 1.3.2.2; commitid EnImYsk0zcaNISTr; 1.3.2.2 date 2006.11.08.16.11.19; author rse; state Exp; branches; next ; commitid EnImYsk0zcaNISTr; desc @@ 1.14 log @regen patch @ text @Index: Makefile.in --- Makefile.in.orig 2009-08-05 07:22:37 +0200 +++ Makefile.in 2009-08-05 19:15:14 +0200 @@@@ -781,7 +781,7 @@@@ # lib_LTLIBRARIES = libarchive.la man_MANS = $(libarchive_man_MANS) $(bsdtar_man_MANS) $(bsdcpio_man_MANS) -BUILT_SOURCES = libarchive/test/list.h tar/test/list.h cpio/test/list.h +BUILT_SOURCES = TESTS_ENVIRONMENT = $(libarchive_TESTS_ENVIRONMENT) $(bsdtar_TESTS_ENVIRONMENT) $(bsdcpio_TESTS_ENVIRONMENT) # Always build and test both bsdtar and bsdcpio as part of 'distcheck' DISTCHECK_CONFIGURE_FLAGS = --enable-bsdtar --enable-bsdcpio Index: cpio/cpio.c --- cpio/cpio.c.orig 2009-07-22 07:15:09 +0200 +++ cpio/cpio.c 2009-08-05 19:15:14 +0200 @@@@ -29,6 +29,9 @@@@ __FBSDID("$FreeBSD: src/usr.bin/cpio/cpio.c,v 1.15 2008/12/06 07:30:40 kientzle Exp $"); #include +#ifdef MAJOR_IN_MKDEV +# include +#endif #include #include @@@@ -72,6 +75,9 @@@@ #ifdef HAVE_TIME_H #include #endif +#ifdef HAVE_SYS_TIME_H +#include +#endif #include "cpio.h" #include "matching.h" @ 1.13 log @regen patch @ text @d2 2 a3 2 --- Makefile.in.orig 2009-04-16 19:49:23 +0200 +++ Makefile.in 2009-04-17 14:38:54 +0200 d14 2 a15 2 --- cpio/cpio.c.orig 2009-04-08 09:09:29 +0200 +++ cpio/cpio.c 2009-04-17 14:38:54 +0200 @ 1.12 log @upgrading package: libarchive 2.6.0 -> 2.6.2 @ text @d2 3 a4 3 --- Makefile.in.orig 2009-02-26 05:44:54 +0100 +++ Makefile.in 2009-03-04 22:49:10 +0100 @@@@ -482,7 +482,7 @@@@ d14 2 a15 2 --- cpio/cpio.c.orig 2009-01-26 06:52:21 +0100 +++ cpio/cpio.c 2009-03-04 22:49:10 +0100 d26 3 a28 3 @@@@ -66,6 +69,9 @@@@ #ifdef HAVE_UNISTD_H #include @ 1.11 log @fix building under solaris @ text @d2 2 a3 2 --- Makefile.in.orig 2008-12-28 21:09:38 +0100 +++ Makefile.in 2008-12-29 09:10:01 +0100 d14 2 a15 2 --- cpio/cpio.c.orig 2008-12-28 21:08:16 +0100 +++ cpio/cpio.c 2009-01-17 00:17:29 +0100 d26 1 a26 1 @@@@ -60,6 +60,9 @@@@ @ 1.10 log @upgrading package: libarchive 2.5.5 -> 2.6.0 @ text @d15 11 a25 1 +++ cpio/cpio.c 2008-12-29 09:10:01 +0100 @ 1.9 log @upgrading package: libarchive 2.4.17 -> 2.5.5 @ text @d2 3 a4 3 --- Makefile.in.orig 2008-07-03 08:06:42 +0200 +++ Makefile.in 2008-07-04 09:45:01 +0200 @@@@ -461,7 +461,7 @@@@ d14 3 a16 3 --- cpio/cpio.c.orig 2008-07-03 07:28:35 +0200 +++ cpio/cpio.c 2008-07-04 09:44:38 +0200 @@@@ -54,6 +54,9 @@@@ a25 21 Index: tar/write.c --- tar/write.c.orig 2008-06-25 07:13:31 +0200 +++ tar/write.c 2008-07-04 09:44:38 +0200 @@@@ -720,7 +720,7 @@@@ continue; #endif -#ifdef __linux +#if defined(__linux) && defined(EXT2_IOC_GETFLAGS) && defined(EXT2_NODUMP_FL) /* * Linux has a nodump flag too but to read it * we have to open() the file/dir and do an ioctl on it... @@@@ -909,7 +909,7 @@@@ archive_entry_set_fflags(entry, st->st_flags, 0); #endif -#ifdef __linux +#if defined(__linux) && defined(EXT2_IOC_GETFLAGS) if ((S_ISREG(st->st_mode) || S_ISDIR(st->st_mode)) && ((fd = open(accpath, O_RDONLY|O_NONBLOCK)) >= 0) && ((r = ioctl(fd, EXT2_IOC_GETFLAGS, &stflags)), close(fd), (fd = -1), r) >= 0 && @ 1.8 log @fix building under Linux @ text @d2 3 a4 3 --- Makefile.in.orig 2008-03-31 00:18:35.000000000 +0200 +++ Makefile.in 2008-04-08 23:07:22.487506516 +0200 @@@@ -458,7 +458,7 @@@@ d8 1 a8 1 -BUILT_SOURCES = libarchive/test/list.h tar/test/list.h cpio/test/list.h $(libarchive_test_REFFILES) $(bsdcpio_test_REFFILES) d14 2 a15 2 --- cpio/cpio.c.orig 2008-03-29 19:09:21.000000000 +0100 +++ cpio/cpio.c 2008-04-08 23:07:22.487506516 +0200 d27 3 a29 3 --- tar/write.c.orig 2008-03-29 19:09:21.000000000 +0100 +++ tar/write.c 2008-04-08 23:12:23.742689957 +0200 @@@@ -700,7 +700,7 @@@@ d38 1 a38 1 @@@@ -844,7 +844,7 @@@@ @ 1.7 log @apply a portability fix @ text @d2 2 a3 2 --- Makefile.in.orig 2008-03-31 00:18:35 +0200 +++ Makefile.in 2008-03-31 19:43:38 +0200 d14 2 a15 2 --- cpio/cpio.c.orig 2008-03-29 19:09:21 +0100 +++ cpio/cpio.c 2008-03-31 19:44:13 +0200 d26 21 @ 1.6 log @upgrading package: libarchive 2.4.15 -> 2.4.17 @ text @d3 1 a3 1 +++ Makefile.in 2008-03-31 08:30:58 +0200 d13 13 @ 1.5 log @do not require uudecode(1) @ text @d2 2 a3 2 --- Makefile.in.orig 2008-03-29 21:01:43 +0100 +++ Makefile.in 2008-03-29 22:37:00 +0100 @ 1.4 log @upgrading package: libarchive 2.0a1 -> 2.0a2 @ text @d1 12 a12 51 Index: libarchive/archive_read_support_compression_none.c --- libarchive/archive_read_support_compression_none.c.orig 2006-09-05 08:00:47 +0200 +++ libarchive/archive_read_support_compression_none.c 2006-11-08 17:06:23 +0100 @@@@ -257,7 +257,9 @@@@ } /* - * Skip at most request bytes. Skipped data is marked as consumed. + * Skip forward by exactly the requested bytes or else return + * ARCHIVE_FATAL. Note that this differs from the contract for + * read_ahead, which does not gaurantee a minimum count. */ static ssize_t archive_decompressor_none_skip(struct archive *a, size_t request) @@@@ -287,9 +289,7 @@@@ if (request == 0) return (total_bytes_skipped); /* - * If no client_skipper is provided, just read the old way. It is very - * likely that after skipping, the request has not yet been fully - * satisfied (and is still > 0). In that case, read as well. + * If a client_skipper was provided, try that first. */ if (a->client_skipper != NULL) { bytes_skipped = (a->client_skipper)(a, a->client_data, @@@@ -307,6 +307,12 @@@@ a->raw_position += bytes_skipped; state->client_avail = state->client_total = 0; } + /* + * Note that client_skipper will usually not satisfy the + * full request (due to low-level blocking concerns), + * so even if client_skipper is provided, we may still + * have to use ordinary reads to finish out the request. + */ while (request > 0) { const void* dummy_buffer; ssize_t bytes_read; @@@@ -314,6 +320,12 @@@@ &dummy_buffer, request); if (bytes_read < 0) return (bytes_read); + if (bytes_read == 0) { + /* We hit EOF before we satisfied the skip request. */ + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Truncated input file (need to skip %d bytes)", (int)request); + return (ARCHIVE_FATAL); + } assert(bytes_read >= 0); /* precondition for cast below */ min = minimum((size_t)bytes_read, request); bytes_read = archive_decompressor_none_read_consume(a, min); @ 1.3 log @security fix: fix infinite loop in corrupt archives handling (FreeBSD-SA-06:24.libarchive) @ text @@ 1.3.2.1 log @file libarchive.patch was added on branch OPENPKG_2_STABLE on 2006-11-08 16:11:19 +0000 @ text @d1 51 @ 1.3.2.2 log @MFC: security fix: fix infinite loop in corrupt archives handling (FreeBSD-SA-06:24.libarchive) @ text @a0 51 Index: libarchive/archive_read_support_compression_none.c --- libarchive/archive_read_support_compression_none.c.orig 2006-09-05 08:00:47 +0200 +++ libarchive/archive_read_support_compression_none.c 2006-11-08 17:06:23 +0100 @@@@ -257,7 +257,9 @@@@ } /* - * Skip at most request bytes. Skipped data is marked as consumed. + * Skip forward by exactly the requested bytes or else return + * ARCHIVE_FATAL. Note that this differs from the contract for + * read_ahead, which does not gaurantee a minimum count. */ static ssize_t archive_decompressor_none_skip(struct archive *a, size_t request) @@@@ -287,9 +289,7 @@@@ if (request == 0) return (total_bytes_skipped); /* - * If no client_skipper is provided, just read the old way. It is very - * likely that after skipping, the request has not yet been fully - * satisfied (and is still > 0). In that case, read as well. + * If a client_skipper was provided, try that first. */ if (a->client_skipper != NULL) { bytes_skipped = (a->client_skipper)(a, a->client_data, @@@@ -307,6 +307,12 @@@@ a->raw_position += bytes_skipped; state->client_avail = state->client_total = 0; } + /* + * Note that client_skipper will usually not satisfy the + * full request (due to low-level blocking concerns), + * so even if client_skipper is provided, we may still + * have to use ordinary reads to finish out the request. + */ while (request > 0) { const void* dummy_buffer; ssize_t bytes_read; @@@@ -314,6 +320,12 @@@@ &dummy_buffer, request); if (bytes_read < 0) return (bytes_read); + if (bytes_read == 0) { + /* We hit EOF before we satisfied the skip request. */ + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Truncated input file (need to skip %d bytes)", (int)request); + return (ARCHIVE_FATAL); + } assert(bytes_read >= 0); /* precondition for cast below */ min = minimum((size_t)bytes_read, request); bytes_read = archive_decompressor_none_read_consume(a, min); @ 1.2 log @upgrading package: libarchive 1.02.036 -> 1.2.37 @ text @d1 4 a4 11 Index: archive_read_support_format_all.c --- archive_read_support_format_all.c.orig 2005-01-23 07:14:09 +0100 +++ archive_read_support_format_all.c 2005-01-23 20:20:09 +0100 @@@@ -33,8 +33,6 @@@@ archive_read_support_format_all(struct archive *a) { archive_read_support_format_cpio(a); - archive_read_support_format_iso9660(a); archive_read_support_format_tar(a); - archive_read_support_format_zip(a); return (ARCHIVE_OK); d6 46 @ 1.1 log @remove references to not existing/distributed parts @ text @@