Imported Upstream version 3.2.1 03/90003/1 upstream/3.2.1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Wed, 28 Sep 2016 04:38:13 +0000 (13:38 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Wed, 28 Sep 2016 04:38:26 +0000 (13:38 +0900)
Change-Id: Ia3da21e5117593a6e6428408ad875e83e4ec9928
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
145 files changed:
CMakeLists.txt
Makefile.am
Makefile.in
NEWS
build/autoconf/config.guess
build/autoconf/config.sub
build/version
cat/bsdcat.c
cat/bsdcat.h
cat/test/main.c
config.h.in
configure
configure.ac
cpio/cpio.c
cpio/test/CMakeLists.txt
cpio/test/list.h
cpio/test/main.c
cpio/test/test_missing_file.c [new file with mode: 0644]
doc/html/archive_entry.3.html
doc/html/archive_entry_acl.3.html
doc/html/archive_entry_linkify.3.html
doc/html/archive_entry_paths.3.html
doc/html/archive_entry_perms.3.html
doc/html/archive_entry_stat.3.html
doc/html/archive_entry_time.3.html
doc/html/archive_read.3.html
doc/html/archive_read_add_passphrase.3.html
doc/html/archive_read_data.3.html
doc/html/archive_read_disk.3.html
doc/html/archive_read_extract.3.html
doc/html/archive_read_filter.3.html
doc/html/archive_read_format.3.html
doc/html/archive_read_free.3.html
doc/html/archive_read_header.3.html
doc/html/archive_read_new.3.html
doc/html/archive_read_open.3.html
doc/html/archive_read_set_options.3.html
doc/html/archive_util.3.html
doc/html/archive_write.3.html
doc/html/archive_write_blocksize.3.html
doc/html/archive_write_data.3.html
doc/html/archive_write_disk.3.html
doc/html/archive_write_filter.3.html
doc/html/archive_write_finish_entry.3.html
doc/html/archive_write_format.3.html
doc/html/archive_write_free.3.html
doc/html/archive_write_header.3.html
doc/html/archive_write_new.3.html
doc/html/archive_write_open.3.html
doc/html/archive_write_set_options.3.html
doc/html/archive_write_set_passphrase.3.html
doc/html/bsdcpio.1.html
doc/html/bsdtar.1.html
doc/html/cpio.5.html
doc/html/libarchive-formats.5.html
doc/html/libarchive.3.html
doc/html/libarchive_changes.3.html
doc/html/libarchive_internals.3.html
doc/html/mtree.5.html
doc/html/tar.5.html
doc/man/archive_write_filter.3
doc/man/archive_write_set_options.3
doc/man/libarchive-formats.5
doc/man/libarchive_changes.3
doc/pdf/archive_entry.3.pdf
doc/pdf/archive_entry_acl.3.pdf
doc/pdf/archive_entry_linkify.3.pdf
doc/pdf/archive_entry_paths.3.pdf
doc/pdf/archive_entry_perms.3.pdf
doc/pdf/archive_entry_stat.3.pdf
doc/pdf/archive_entry_time.3.pdf
doc/pdf/archive_read.3.pdf
doc/pdf/archive_read_add_passphrase.3.pdf
doc/pdf/archive_read_data.3.pdf
doc/pdf/archive_read_disk.3.pdf
doc/pdf/archive_read_extract.3.pdf
doc/pdf/archive_read_filter.3.pdf
doc/pdf/archive_read_format.3.pdf
doc/pdf/archive_read_free.3.pdf
doc/pdf/archive_read_header.3.pdf
doc/pdf/archive_read_new.3.pdf
doc/pdf/archive_read_open.3.pdf
doc/pdf/archive_read_set_options.3.pdf
doc/pdf/archive_util.3.pdf
doc/pdf/archive_write.3.pdf
doc/pdf/archive_write_blocksize.3.pdf
doc/pdf/archive_write_data.3.pdf
doc/pdf/archive_write_disk.3.pdf
doc/pdf/archive_write_filter.3.pdf
doc/pdf/archive_write_finish_entry.3.pdf
doc/pdf/archive_write_format.3.pdf
doc/pdf/archive_write_free.3.pdf
doc/pdf/archive_write_header.3.pdf
doc/pdf/archive_write_new.3.pdf
doc/pdf/archive_write_open.3.pdf
doc/pdf/archive_write_set_options.3.pdf
doc/pdf/archive_write_set_passphrase.3.pdf
doc/pdf/bsdcpio.1.pdf
doc/pdf/bsdtar.1.pdf
doc/pdf/cpio.5.pdf
doc/pdf/libarchive-formats.5.pdf
doc/pdf/libarchive.3.pdf
doc/pdf/libarchive_changes.3.pdf
doc/pdf/libarchive_internals.3.pdf
doc/pdf/mtree.5.pdf
doc/pdf/tar.5.pdf
doc/text/archive_write_filter.3.txt
doc/text/archive_write_set_options.3.txt
doc/text/libarchive_changes.3.txt
doc/wiki/ManPageArchiveWriteFilter3.wiki
doc/wiki/ManPageArchiveWriteSetOptions3.wiki
doc/wiki/ManPageLibarchiveChanges3.wiki
doc/wiki/ManPageLibarchiveFormats5.wiki
libarchive/archive.h
libarchive/archive_entry.h
libarchive/archive_entry_xattr.c
libarchive/archive_ppmd7.c
libarchive/archive_read_disk_windows.c
libarchive/archive_read_support_format_7zip.c
libarchive/archive_read_support_format_cpio.c
libarchive/archive_read_support_format_iso9660.c
libarchive/archive_read_support_format_mtree.c
libarchive/archive_read_support_format_rar.c
libarchive/archive_read_support_format_tar.c
libarchive/archive_read_support_format_zip.c
libarchive/archive_write_disk_windows.c
libarchive/archive_write_filter.3
libarchive/archive_write_set_format_gnutar.c
libarchive/archive_write_set_format_iso9660.c
libarchive/archive_write_set_options.3
libarchive/libarchive-formats.5
libarchive/libarchive_changes.3
libarchive/test/CMakeLists.txt
libarchive/test/list.h
libarchive/test/main.c
libarchive/test/test_read_format_rar_invalid1.c [new file with mode: 0644]
libarchive/test/test_read_format_rar_invalid1.rar.uu [new file with mode: 0644]
libarchive/test/test_write_format_gnutar_filenames.c [new file with mode: 0644]
libarchive/xxhash.c
libarchive_fe/err.c
tar/test/CMakeLists.txt
tar/test/list.h
tar/test/main.c
tar/test/test_missing_file.c [new file with mode: 0644]
tar/write.c

index d8a7c5d..68e94a6 100644 (file)
@@ -15,7 +15,7 @@ endif()
 #   RelWithDebInfo : Release build with Debug Info
 #   MinSizeRel     : Release Min Size build
 IF(NOT CMAKE_BUILD_TYPE)
-  SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE)
+  SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE)
 ENDIF(NOT CMAKE_BUILD_TYPE)
 # Set a value type to properly display CMAKE_BUILD_TYPE on GUI if the
 # value type is "UNINITIALIZED".
@@ -365,7 +365,7 @@ IF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}")
   #   e.g.
   #     cmake -DCMAKE_PREFIX_PATH=<your-GnuWin32-path> <path-to-source>
   #
-  # If compiling error occured in zconf.h, You may need patch to zconf.h.
+  # If compiling error occurred in zconf.h, You may need patch to zconf.h.
   #--- zconf.h.orig    2005-07-21 00:40:26.000000000
   #+++ zconf.h 2009-01-19 11:39:10.093750000
   #@@ -286,7 +286,7 @@
index a36bccb..b02797f 100644 (file)
@@ -23,7 +23,7 @@ TESTS_ENVIRONMENT= $(libarchive_TESTS_ENVIRONMENT) $(bsdtar_TESTS_ENVIRONMENT) $
 DISTCHECK_CONFIGURE_FLAGS = --enable-bsdtar --enable-bsdcpio
 # The next line is commented out by default in shipping libarchive releases.
 # It is uncommented by default in trunk.
-#DEV_CFLAGS=-Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual -g
+# DEV_CFLAGS=-Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual -g
 AM_CFLAGS=$(DEV_CFLAGS)
 PLATFORMCPPFLAGS = @PLATFORMCPPFLAGS@
 AM_CPPFLAGS=$(PLATFORMCPPFLAGS)
@@ -454,6 +454,7 @@ libarchive_test_SOURCES= \
        libarchive/test/test_read_format_rar_encryption_data.c \
        libarchive/test/test_read_format_rar_encryption_partially.c \
        libarchive/test/test_read_format_rar_encryption_header.c \
+       libarchive/test/test_read_format_rar_invalid1.c \
        libarchive/test/test_read_format_raw.c \
        libarchive/test/test_read_format_tar.c \
        libarchive/test/test_read_format_tar_concatenated.c \
@@ -533,6 +534,7 @@ libarchive_test_SOURCES= \
        libarchive/test/test_write_format_cpio_newc.c \
        libarchive/test/test_write_format_cpio_odc.c \
        libarchive/test/test_write_format_gnutar.c \
+       libarchive/test/test_write_format_gnutar_filenames.c \
        libarchive/test/test_write_format_iso9660.c \
        libarchive/test/test_write_format_iso9660_boot.c \
        libarchive/test/test_write_format_iso9660_empty.c \
@@ -746,6 +748,7 @@ libarchive_test_EXTRA_DIST=\
        libarchive/test/test_read_format_rar_encryption_data.rar.uu \
        libarchive/test/test_read_format_rar_encryption_header.rar.uu \
        libarchive/test/test_read_format_rar_encryption_partially.rar.uu \
+       libarchive/test/test_read_format_rar_invalid1.rar.uu \
        libarchive/test/test_read_format_rar_multi_lzss_blocks.rar.uu \
        libarchive/test/test_read_format_rar_multivolume.part0001.rar.uu \
        libarchive/test/test_read_format_rar_multivolume.part0002.rar.uu \
@@ -909,6 +912,7 @@ bsdtar_test_SOURCES= \
        tar/test/test_format_newc.c \
        tar/test/test_help.c \
        tar/test/test_leading_slash.c \
+       tar/test/test_missing_file.c \
        tar/test/test_option_C_upper.c \
        tar/test/test_option_H_upper.c \
        tar/test/test_option_L_upper.c \
@@ -1064,6 +1068,7 @@ bsdcpio_test_SOURCES= \
        cpio/test/test_extract_cpio_xz.c \
        cpio/test/test_format_newc.c \
        cpio/test/test_gcpio_compat.c \
+       cpio/test/test_missing_file.c \
        cpio/test/test_option_0.c \
        cpio/test/test_option_B_upper.c \
        cpio/test/test_option_C_upper.c \
index ebb21a7..0d860d3 100644 (file)
@@ -488,6 +488,7 @@ am_bsdcpio_test_OBJECTS = $(am__objects_5) \
        cpio/test/bsdcpio_test-test_extract_cpio_xz.$(OBJEXT) \
        cpio/test/bsdcpio_test-test_format_newc.$(OBJEXT) \
        cpio/test/bsdcpio_test-test_gcpio_compat.$(OBJEXT) \
+       cpio/test/bsdcpio_test-test_missing_file.$(OBJEXT) \
        cpio/test/bsdcpio_test-test_option_0.$(OBJEXT) \
        cpio/test/bsdcpio_test-test_option_B_upper.$(OBJEXT) \
        cpio/test/bsdcpio_test-test_option_C_upper.$(OBJEXT) \
@@ -555,6 +556,7 @@ am_bsdtar_test_OBJECTS = $(am__objects_7) \
        tar/test/bsdtar_test-test_format_newc.$(OBJEXT) \
        tar/test/bsdtar_test-test_help.$(OBJEXT) \
        tar/test/bsdtar_test-test_leading_slash.$(OBJEXT) \
+       tar/test/bsdtar_test-test_missing_file.$(OBJEXT) \
        tar/test/bsdtar_test-test_option_C_upper.$(OBJEXT) \
        tar/test/bsdtar_test-test_option_H_upper.$(OBJEXT) \
        tar/test/bsdtar_test-test_option_L_upper.$(OBJEXT) \
@@ -860,6 +862,7 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \
        libarchive/test/test_read_format_rar_encryption_data.c \
        libarchive/test/test_read_format_rar_encryption_partially.c \
        libarchive/test/test_read_format_rar_encryption_header.c \
+       libarchive/test/test_read_format_rar_invalid1.c \
        libarchive/test/test_read_format_raw.c \
        libarchive/test/test_read_format_tar.c \
        libarchive/test/test_read_format_tar_concatenated.c \
@@ -939,6 +942,7 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \
        libarchive/test/test_write_format_cpio_newc.c \
        libarchive/test/test_write_format_cpio_odc.c \
        libarchive/test/test_write_format_gnutar.c \
+       libarchive/test/test_write_format_gnutar_filenames.c \
        libarchive/test/test_write_format_iso9660.c \
        libarchive/test/test_write_format_iso9660_boot.c \
        libarchive/test/test_write_format_iso9660_empty.c \
@@ -1231,6 +1235,7 @@ am_libarchive_test_OBJECTS = $(am__objects_9) $(am__objects_10) \
        libarchive/test/libarchive_test-test_read_format_rar_encryption_data.$(OBJEXT) \
        libarchive/test/libarchive_test-test_read_format_rar_encryption_partially.$(OBJEXT) \
        libarchive/test/libarchive_test-test_read_format_rar_encryption_header.$(OBJEXT) \
+       libarchive/test/libarchive_test-test_read_format_rar_invalid1.$(OBJEXT) \
        libarchive/test/libarchive_test-test_read_format_raw.$(OBJEXT) \
        libarchive/test/libarchive_test-test_read_format_tar.$(OBJEXT) \
        libarchive/test/libarchive_test-test_read_format_tar_concatenated.$(OBJEXT) \
@@ -1310,6 +1315,7 @@ am_libarchive_test_OBJECTS = $(am__objects_9) $(am__objects_10) \
        libarchive/test/libarchive_test-test_write_format_cpio_newc.$(OBJEXT) \
        libarchive/test/libarchive_test-test_write_format_cpio_odc.$(OBJEXT) \
        libarchive/test/libarchive_test-test_write_format_gnutar.$(OBJEXT) \
+       libarchive/test/libarchive_test-test_write_format_gnutar_filenames.$(OBJEXT) \
        libarchive/test/libarchive_test-test_write_format_iso9660.$(OBJEXT) \
        libarchive/test/libarchive_test-test_write_format_iso9660_boot.$(OBJEXT) \
        libarchive/test/libarchive_test-test_write_format_iso9660_empty.$(OBJEXT) \
@@ -1777,7 +1783,7 @@ TESTS_ENVIRONMENT = $(libarchive_TESTS_ENVIRONMENT) $(bsdtar_TESTS_ENVIRONMENT)
 DISTCHECK_CONFIGURE_FLAGS = --enable-bsdtar --enable-bsdcpio
 # The next line is commented out by default in shipping libarchive releases.
 # It is uncommented by default in trunk.
-#DEV_CFLAGS=-Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual -g
+# DEV_CFLAGS=-Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual -g
 AM_CFLAGS = $(DEV_CFLAGS)
 AM_CPPFLAGS = $(PLATFORMCPPFLAGS)
 
@@ -2158,6 +2164,7 @@ libarchive_test_SOURCES = \
        libarchive/test/test_read_format_rar_encryption_data.c \
        libarchive/test/test_read_format_rar_encryption_partially.c \
        libarchive/test/test_read_format_rar_encryption_header.c \
+       libarchive/test/test_read_format_rar_invalid1.c \
        libarchive/test/test_read_format_raw.c \
        libarchive/test/test_read_format_tar.c \
        libarchive/test/test_read_format_tar_concatenated.c \
@@ -2237,6 +2244,7 @@ libarchive_test_SOURCES = \
        libarchive/test/test_write_format_cpio_newc.c \
        libarchive/test/test_write_format_cpio_odc.c \
        libarchive/test/test_write_format_gnutar.c \
+       libarchive/test/test_write_format_gnutar_filenames.c \
        libarchive/test/test_write_format_iso9660.c \
        libarchive/test/test_write_format_iso9660_boot.c \
        libarchive/test/test_write_format_iso9660_empty.c \
@@ -2441,6 +2449,7 @@ libarchive_test_EXTRA_DIST = \
        libarchive/test/test_read_format_rar_encryption_data.rar.uu \
        libarchive/test/test_read_format_rar_encryption_header.rar.uu \
        libarchive/test/test_read_format_rar_encryption_partially.rar.uu \
+       libarchive/test/test_read_format_rar_invalid1.rar.uu \
        libarchive/test/test_read_format_rar_multi_lzss_blocks.rar.uu \
        libarchive/test/test_read_format_rar_multivolume.part0001.rar.uu \
        libarchive/test/test_read_format_rar_multivolume.part0002.rar.uu \
@@ -2579,6 +2588,7 @@ bsdtar_test_SOURCES = \
        tar/test/test_format_newc.c \
        tar/test/test_help.c \
        tar/test/test_leading_slash.c \
+       tar/test/test_missing_file.c \
        tar/test/test_option_C_upper.c \
        tar/test/test_option_H_upper.c \
        tar/test/test_option_L_upper.c \
@@ -2704,6 +2714,7 @@ bsdcpio_test_SOURCES = \
        cpio/test/test_extract_cpio_xz.c \
        cpio/test/test_format_newc.c \
        cpio/test/test_gcpio_compat.c \
+       cpio/test/test_missing_file.c \
        cpio/test/test_option_0.c \
        cpio/test/test_option_B_upper.c \
        cpio/test/test_option_C_upper.c \
@@ -3454,6 +3465,8 @@ cpio/test/bsdcpio_test-test_format_newc.$(OBJEXT):  \
        cpio/test/$(am__dirstamp) cpio/test/$(DEPDIR)/$(am__dirstamp)
 cpio/test/bsdcpio_test-test_gcpio_compat.$(OBJEXT):  \
        cpio/test/$(am__dirstamp) cpio/test/$(DEPDIR)/$(am__dirstamp)
+cpio/test/bsdcpio_test-test_missing_file.$(OBJEXT):  \
+       cpio/test/$(am__dirstamp) cpio/test/$(DEPDIR)/$(am__dirstamp)
 cpio/test/bsdcpio_test-test_option_0.$(OBJEXT):  \
        cpio/test/$(am__dirstamp) cpio/test/$(DEPDIR)/$(am__dirstamp)
 cpio/test/bsdcpio_test-test_option_B_upper.$(OBJEXT):  \
@@ -3589,6 +3602,8 @@ tar/test/bsdtar_test-test_help.$(OBJEXT): tar/test/$(am__dirstamp) \
        tar/test/$(DEPDIR)/$(am__dirstamp)
 tar/test/bsdtar_test-test_leading_slash.$(OBJEXT):  \
        tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
+tar/test/bsdtar_test-test_missing_file.$(OBJEXT):  \
+       tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
 tar/test/bsdtar_test-test_option_C_upper.$(OBJEXT):  \
        tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
 tar/test/bsdtar_test-test_option_H_upper.$(OBJEXT):  \
@@ -4442,6 +4457,9 @@ libarchive/test/libarchive_test-test_read_format_rar_encryption_partially.$(OBJE
 libarchive/test/libarchive_test-test_read_format_rar_encryption_header.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
+libarchive/test/libarchive_test-test_read_format_rar_invalid1.$(OBJEXT):  \
+       libarchive/test/$(am__dirstamp) \
+       libarchive/test/$(DEPDIR)/$(am__dirstamp)
 libarchive/test/libarchive_test-test_read_format_raw.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
@@ -4679,6 +4697,9 @@ libarchive/test/libarchive_test-test_write_format_cpio_odc.$(OBJEXT):  \
 libarchive/test/libarchive_test-test_write_format_gnutar.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
+libarchive/test/libarchive_test-test_write_format_gnutar_filenames.$(OBJEXT):  \
+       libarchive/test/$(am__dirstamp) \
+       libarchive/test/$(DEPDIR)/$(am__dirstamp)
 libarchive/test/libarchive_test-test_write_format_iso9660.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
@@ -4848,6 +4869,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_extract_cpio_xz.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_format_newc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_gcpio_compat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_missing_file.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_option_0.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_option_B_upper.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_option_C_upper.Po@am__quote@
@@ -5250,6 +5272,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_rar_encryption_data.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_rar_encryption_header.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_rar_encryption_partially.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_rar_invalid1.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_raw.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tar.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tar_concatenated.Po@am__quote@
@@ -5329,6 +5352,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_cpio_newc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_cpio_odc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_gnutar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_gnutar_filenames.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_iso9660.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_iso9660_boot.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_iso9660_empty.Po@am__quote@
@@ -5394,6 +5418,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_format_newc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_help.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_leading_slash.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_missing_file.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_C_upper.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_H_upper.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_L_upper.Po@am__quote@
@@ -6043,6 +6068,20 @@ cpio/test/bsdcpio_test-test_gcpio_compat.obj: cpio/test/test_gcpio_compat.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cpio/test/bsdcpio_test-test_gcpio_compat.obj `if test -f 'cpio/test/test_gcpio_compat.c'; then $(CYGPATH_W) 'cpio/test/test_gcpio_compat.c'; else $(CYGPATH_W) '$(srcdir)/cpio/test/test_gcpio_compat.c'; fi`
 
+cpio/test/bsdcpio_test-test_missing_file.o: cpio/test/test_missing_file.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cpio/test/bsdcpio_test-test_missing_file.o -MD -MP -MF cpio/test/$(DEPDIR)/bsdcpio_test-test_missing_file.Tpo -c -o cpio/test/bsdcpio_test-test_missing_file.o `test -f 'cpio/test/test_missing_file.c' || echo '$(srcdir)/'`cpio/test/test_missing_file.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) cpio/test/$(DEPDIR)/bsdcpio_test-test_missing_file.Tpo cpio/test/$(DEPDIR)/bsdcpio_test-test_missing_file.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='cpio/test/test_missing_file.c' object='cpio/test/bsdcpio_test-test_missing_file.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cpio/test/bsdcpio_test-test_missing_file.o `test -f 'cpio/test/test_missing_file.c' || echo '$(srcdir)/'`cpio/test/test_missing_file.c
+
+cpio/test/bsdcpio_test-test_missing_file.obj: cpio/test/test_missing_file.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cpio/test/bsdcpio_test-test_missing_file.obj -MD -MP -MF cpio/test/$(DEPDIR)/bsdcpio_test-test_missing_file.Tpo -c -o cpio/test/bsdcpio_test-test_missing_file.obj `if test -f 'cpio/test/test_missing_file.c'; then $(CYGPATH_W) 'cpio/test/test_missing_file.c'; else $(CYGPATH_W) '$(srcdir)/cpio/test/test_missing_file.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) cpio/test/$(DEPDIR)/bsdcpio_test-test_missing_file.Tpo cpio/test/$(DEPDIR)/bsdcpio_test-test_missing_file.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='cpio/test/test_missing_file.c' object='cpio/test/bsdcpio_test-test_missing_file.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cpio/test/bsdcpio_test-test_missing_file.obj `if test -f 'cpio/test/test_missing_file.c'; then $(CYGPATH_W) 'cpio/test/test_missing_file.c'; else $(CYGPATH_W) '$(srcdir)/cpio/test/test_missing_file.c'; fi`
+
 cpio/test/bsdcpio_test-test_option_0.o: cpio/test/test_option_0.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cpio/test/bsdcpio_test-test_option_0.o -MD -MP -MF cpio/test/$(DEPDIR)/bsdcpio_test-test_option_0.Tpo -c -o cpio/test/bsdcpio_test-test_option_0.o `test -f 'cpio/test/test_option_0.c' || echo '$(srcdir)/'`cpio/test/test_option_0.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) cpio/test/$(DEPDIR)/bsdcpio_test-test_option_0.Tpo cpio/test/$(DEPDIR)/bsdcpio_test-test_option_0.Po
@@ -6841,6 +6880,20 @@ tar/test/bsdtar_test-test_leading_slash.obj: tar/test/test_leading_slash.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_leading_slash.obj `if test -f 'tar/test/test_leading_slash.c'; then $(CYGPATH_W) 'tar/test/test_leading_slash.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_leading_slash.c'; fi`
 
+tar/test/bsdtar_test-test_missing_file.o: tar/test/test_missing_file.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_missing_file.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_missing_file.Tpo -c -o tar/test/bsdtar_test-test_missing_file.o `test -f 'tar/test/test_missing_file.c' || echo '$(srcdir)/'`tar/test/test_missing_file.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_missing_file.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_missing_file.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tar/test/test_missing_file.c' object='tar/test/bsdtar_test-test_missing_file.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_missing_file.o `test -f 'tar/test/test_missing_file.c' || echo '$(srcdir)/'`tar/test/test_missing_file.c
+
+tar/test/bsdtar_test-test_missing_file.obj: tar/test/test_missing_file.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_missing_file.obj -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_missing_file.Tpo -c -o tar/test/bsdtar_test-test_missing_file.obj `if test -f 'tar/test/test_missing_file.c'; then $(CYGPATH_W) 'tar/test/test_missing_file.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_missing_file.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_missing_file.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_missing_file.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tar/test/test_missing_file.c' object='tar/test/bsdtar_test-test_missing_file.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_missing_file.obj `if test -f 'tar/test/test_missing_file.c'; then $(CYGPATH_W) 'tar/test/test_missing_file.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_missing_file.c'; fi`
+
 tar/test/bsdtar_test-test_option_C_upper.o: tar/test/test_option_C_upper.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_C_upper.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_C_upper.Tpo -c -o tar/test/bsdtar_test-test_option_C_upper.o `test -f 'tar/test/test_option_C_upper.c' || echo '$(srcdir)/'`tar/test/test_option_C_upper.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_C_upper.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_C_upper.Po
@@ -10957,6 +11010,20 @@ libarchive/test/libarchive_test-test_read_format_rar_encryption_header.obj: liba
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_read_format_rar_encryption_header.obj `if test -f 'libarchive/test/test_read_format_rar_encryption_header.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_rar_encryption_header.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_rar_encryption_header.c'; fi`
 
+libarchive/test/libarchive_test-test_read_format_rar_invalid1.o: libarchive/test/test_read_format_rar_invalid1.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_read_format_rar_invalid1.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_rar_invalid1.Tpo -c -o libarchive/test/libarchive_test-test_read_format_rar_invalid1.o `test -f 'libarchive/test/test_read_format_rar_invalid1.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_rar_invalid1.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_rar_invalid1.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_rar_invalid1.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_read_format_rar_invalid1.c' object='libarchive/test/libarchive_test-test_read_format_rar_invalid1.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_read_format_rar_invalid1.o `test -f 'libarchive/test/test_read_format_rar_invalid1.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_rar_invalid1.c
+
+libarchive/test/libarchive_test-test_read_format_rar_invalid1.obj: libarchive/test/test_read_format_rar_invalid1.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_read_format_rar_invalid1.obj -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_rar_invalid1.Tpo -c -o libarchive/test/libarchive_test-test_read_format_rar_invalid1.obj `if test -f 'libarchive/test/test_read_format_rar_invalid1.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_rar_invalid1.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_rar_invalid1.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_rar_invalid1.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_rar_invalid1.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_read_format_rar_invalid1.c' object='libarchive/test/libarchive_test-test_read_format_rar_invalid1.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_read_format_rar_invalid1.obj `if test -f 'libarchive/test/test_read_format_rar_invalid1.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_rar_invalid1.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_rar_invalid1.c'; fi`
+
 libarchive/test/libarchive_test-test_read_format_raw.o: libarchive/test/test_read_format_raw.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_read_format_raw.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_raw.Tpo -c -o libarchive/test/libarchive_test-test_read_format_raw.o `test -f 'libarchive/test/test_read_format_raw.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_raw.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_raw.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_raw.Po
@@ -12063,6 +12130,20 @@ libarchive/test/libarchive_test-test_write_format_gnutar.obj: libarchive/test/te
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_write_format_gnutar.obj `if test -f 'libarchive/test/test_write_format_gnutar.c'; then $(CYGPATH_W) 'libarchive/test/test_write_format_gnutar.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_gnutar.c'; fi`
 
+libarchive/test/libarchive_test-test_write_format_gnutar_filenames.o: libarchive/test/test_write_format_gnutar_filenames.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_write_format_gnutar_filenames.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_gnutar_filenames.Tpo -c -o libarchive/test/libarchive_test-test_write_format_gnutar_filenames.o `test -f 'libarchive/test/test_write_format_gnutar_filenames.c' || echo '$(srcdir)/'`libarchive/test/test_write_format_gnutar_filenames.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_gnutar_filenames.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_gnutar_filenames.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_write_format_gnutar_filenames.c' object='libarchive/test/libarchive_test-test_write_format_gnutar_filenames.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_write_format_gnutar_filenames.o `test -f 'libarchive/test/test_write_format_gnutar_filenames.c' || echo '$(srcdir)/'`libarchive/test/test_write_format_gnutar_filenames.c
+
+libarchive/test/libarchive_test-test_write_format_gnutar_filenames.obj: libarchive/test/test_write_format_gnutar_filenames.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_write_format_gnutar_filenames.obj -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_gnutar_filenames.Tpo -c -o libarchive/test/libarchive_test-test_write_format_gnutar_filenames.obj `if test -f 'libarchive/test/test_write_format_gnutar_filenames.c'; then $(CYGPATH_W) 'libarchive/test/test_write_format_gnutar_filenames.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_gnutar_filenames.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_gnutar_filenames.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_gnutar_filenames.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_write_format_gnutar_filenames.c' object='libarchive/test/libarchive_test-test_write_format_gnutar_filenames.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_write_format_gnutar_filenames.obj `if test -f 'libarchive/test/test_write_format_gnutar_filenames.c'; then $(CYGPATH_W) 'libarchive/test/test_write_format_gnutar_filenames.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_gnutar_filenames.c'; fi`
+
 libarchive/test/libarchive_test-test_write_format_iso9660.o: libarchive/test/test_write_format_iso9660.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_write_format_iso9660.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_iso9660.Tpo -c -o libarchive/test/libarchive_test-test_write_format_iso9660.o `test -f 'libarchive/test/test_write_format_iso9660.c' || echo '$(srcdir)/'`libarchive/test/test_write_format_iso9660.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_iso9660.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_iso9660.Po
diff --git a/NEWS b/NEWS
index 5bf8776..f672d3d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+Jun 20, 2016: libarchive 3.2.1 released
+    This fixes a handful of security and other critical issues with 3.2.0
+
+May 01, 2016: libarchive 3.2.0 released
+
 Apr 09, 2016: libarchive 3.1.901a released
     Another test release in preparation for 3.2.0
 
index 1f5c50c..c4bd827 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2014 Free Software Foundation, Inc.
+#   Copyright 1992-2016 Free Software Foundation, Inc.
 
-timestamp='2014-03-23'
+timestamp='2016-05-15'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -24,12 +24,12 @@ timestamp='2014-03-23'
 # program.  This Exception is an additional permission under section 7
 # of the GNU General Public License, version 3 ("GPLv3").
 #
-# Originally written by Per Bothner.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 #
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
 
 
 me=`echo "$0" | sed -e 's,.*/,,'`
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2014 Free Software Foundation, Inc.
+Copyright 1992-2016 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -168,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # Note: NetBSD doesn't particularly care about the vendor
        # portion of the name.  We always set it to "unknown".
        sysctl="sysctl -n hw.machine_arch"
-       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+       UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+           /sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || \
+           echo unknown)`
        case "${UNAME_MACHINE_ARCH}" in
            armeb) machine=armeb-unknown ;;
            arm*) machine=arm-unknown ;;
            sh3el) machine=shl-unknown ;;
            sh3eb) machine=sh-unknown ;;
            sh5el) machine=sh5le-unknown ;;
+           earmv*)
+               arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+               endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+               machine=${arch}${endian}-unknown
+               ;;
            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
        esac
        # The Operating System including object format, if it has switched
-       # to ELF recently, or will in the future.
+       # to ELF recently (or will in the future) and ABI.
        case "${UNAME_MACHINE_ARCH}" in
+           earm*)
+               os=netbsdelf
+               ;;
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
                eval $set_cc_for_build
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -197,6 +207,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                os=netbsd
                ;;
        esac
+       # Determine ABI tags.
+       case "${UNAME_MACHINE_ARCH}" in
+           earm*)
+               expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+               abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+               ;;
+       esac
        # The OS release
        # Debian GNU/NetBSD machines have a different userland, and
        # thus, need a distinct triplet. However, they do not need
@@ -207,13 +224,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                release='-gnu'
                ;;
            *)
-               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
                ;;
        esac
        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
        # contains redundant information, the shorter form:
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-       echo "${machine}-${os}${release}"
+       echo "${machine}-${os}${release}${abi}"
        exit ;;
     *:Bitrig:*:*)
        UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@@ -223,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
        echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
        exit ;;
+    *:LibertyBSD:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+       exit ;;
     *:ekkoBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
        exit ;;
@@ -235,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:MirBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
        exit ;;
+    *:Sortix:*:*)
+       echo ${UNAME_MACHINE}-unknown-sortix
+       exit ;;
     alpha:OSF1:*:*)
        case $UNAME_RELEASE in
        *4.0)
@@ -251,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
        case "$ALPHA_CPU_TYPE" in
            "EV4 (21064)")
-               UNAME_MACHINE="alpha" ;;
+               UNAME_MACHINE=alpha ;;
            "EV4.5 (21064)")
-               UNAME_MACHINE="alpha" ;;
+               UNAME_MACHINE=alpha ;;
            "LCA4 (21066/21068)")
-               UNAME_MACHINE="alpha" ;;
+               UNAME_MACHINE=alpha ;;
            "EV5 (21164)")
-               UNAME_MACHINE="alphaev5" ;;
+               UNAME_MACHINE=alphaev5 ;;
            "EV5.6 (21164A)")
-               UNAME_MACHINE="alphaev56" ;;
+               UNAME_MACHINE=alphaev56 ;;
            "EV5.6 (21164PC)")
-               UNAME_MACHINE="alphapca56" ;;
+               UNAME_MACHINE=alphapca56 ;;
            "EV5.7 (21164PC)")
-               UNAME_MACHINE="alphapca57" ;;
+               UNAME_MACHINE=alphapca57 ;;
            "EV6 (21264)")
-               UNAME_MACHINE="alphaev6" ;;
+               UNAME_MACHINE=alphaev6 ;;
            "EV6.7 (21264A)")
-               UNAME_MACHINE="alphaev67" ;;
+               UNAME_MACHINE=alphaev67 ;;
            "EV6.8CB (21264C)")
-               UNAME_MACHINE="alphaev68" ;;
+               UNAME_MACHINE=alphaev68 ;;
            "EV6.8AL (21264B)")
-               UNAME_MACHINE="alphaev68" ;;
+               UNAME_MACHINE=alphaev68 ;;
            "EV6.8CX (21264D)")
-               UNAME_MACHINE="alphaev68" ;;
+               UNAME_MACHINE=alphaev68 ;;
            "EV6.9A (21264/EV69A)")
-               UNAME_MACHINE="alphaev69" ;;
+               UNAME_MACHINE=alphaev69 ;;
            "EV7 (21364)")
-               UNAME_MACHINE="alphaev7" ;;
+               UNAME_MACHINE=alphaev7 ;;
            "EV7.9 (21364A)")
-               UNAME_MACHINE="alphaev79" ;;
+               UNAME_MACHINE=alphaev79 ;;
        esac
        # A Pn.n version is a patched version.
        # A Vn.n version is a released version.
        # A Tn.n version is a released field test version.
        # A Xn.n version is an unreleased experimental baselevel.
        # 1.2 uses "1.2" for uname -r.
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
        # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
        exitcode=$?
        trap '' 0
@@ -359,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
        eval $set_cc_for_build
-       SUN_ARCH="i386"
+       SUN_ARCH=i386
        # If there is a compiler, see if it is configured for 64-bit objects.
        # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
        # This test works for both compilers.
-       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+       if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
            if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
                grep IS_64BIT_ARCH >/dev/null
            then
-               SUN_ARCH="x86_64"
+               SUN_ARCH=x86_64
            fi
        fi
        echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -393,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        exit ;;
     sun*:*:4.2BSD:*)
        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
        case "`/bin/arch`" in
            sun3)
                echo m68k-sun-sunos${UNAME_RELEASE}
@@ -579,8 +603,9 @@ EOF
        else
                IBM_ARCH=powerpc
        fi
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
+       if [ -x /usr/bin/lslpp ] ; then
+               IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+                          awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
        else
                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
        fi
@@ -617,13 +642,13 @@ EOF
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
                    case "${sc_cpu_version}" in
-                     523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                     528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                     523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+                     528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
                      532)                      # CPU_PA_RISC2_0
                        case "${sc_kernel_bits}" in
-                         32) HP_ARCH="hppa2.0n" ;;
-                         64) HP_ARCH="hppa2.0w" ;;
-                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                         32) HP_ARCH=hppa2.0n ;;
+                         64) HP_ARCH=hppa2.0w ;;
+                         '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
                        esac ;;
                    esac
                fi
@@ -662,11 +687,11 @@ EOF
                    exit (0);
                }
 EOF
-                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
                    test -z "$HP_ARCH" && HP_ARCH=hppa
                fi ;;
        esac
-       if [ ${HP_ARCH} = "hppa2.0w" ]
+       if [ ${HP_ARCH} = hppa2.0w ]
        then
            eval $set_cc_for_build
 
@@ -679,12 +704,12 @@ EOF
            # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
            # => hppa64-hp-hpux11.23
 
-           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+           if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
                grep -q __LP64__
            then
-               HP_ARCH="hppa2.0w"
+               HP_ARCH=hppa2.0w
            else
-               HP_ARCH="hppa64"
+               HP_ARCH=hppa64
            fi
        fi
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -789,14 +814,14 @@ EOF
        echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+       FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+       FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit ;;
     5000:UNIX_System_V:4.*:*)
-       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+       FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@@ -878,7 +903,7 @@ EOF
        exit ;;
     *:GNU/*:*:*)
        # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
        exit ;;
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
@@ -901,7 +926,7 @@ EOF
          EV68*) UNAME_MACHINE=alphaev68 ;;
        esac
        objdump --private-headers /bin/sh | grep -q ld.so.1
-       if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+       if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     arc:Linux:*:* | arceb:Linux:*:*)
@@ -932,6 +957,9 @@ EOF
     crisv32:Linux:*:*)
        echo ${UNAME_MACHINE}-axis-linux-${LIBC}
        exit ;;
+    e2k:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
     frv:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
@@ -944,6 +972,9 @@ EOF
     ia64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
+    k1om:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
     m32r*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
@@ -1020,7 +1051,7 @@ EOF
        echo ${UNAME_MACHINE}-dec-linux-${LIBC}
        exit ;;
     x86_64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
        exit ;;
     xtensa*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
@@ -1099,7 +1130,7 @@ EOF
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
        # the processor, so we play safe by assuming i586.
        # Note: whatever this is, it MUST be the same as what config.sub
-       # prints for the "djgpp" host, or else GDB configury will decide that
+       # prints for the "djgpp" host, or else GDB configure will decide that
        # this is a cross-build.
        echo i586-pc-msdosdjgpp
        exit ;;
@@ -1248,6 +1279,9 @@ EOF
     SX-8R:SUPER-UX:*:*)
        echo sx8r-nec-superux${UNAME_RELEASE}
        exit ;;
+    SX-ACE:SUPER-UX:*:*)
+       echo sxace-nec-superux${UNAME_RELEASE}
+       exit ;;
     Power*:Rhapsody:*:*)
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
        exit ;;
@@ -1261,9 +1295,9 @@ EOF
            UNAME_PROCESSOR=powerpc
        fi
        if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
-           if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
                if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-                   (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
                    grep IS_64BIT_ARCH >/dev/null
                then
                    case $UNAME_PROCESSOR in
@@ -1285,7 +1319,7 @@ EOF
        exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
        UNAME_PROCESSOR=`uname -p`
-       if test "$UNAME_PROCESSOR" = "x86"; then
+       if test "$UNAME_PROCESSOR" = x86; then
                UNAME_PROCESSOR=i386
                UNAME_MACHINE=pc
        fi
@@ -1316,7 +1350,7 @@ EOF
        # "uname -m" is not consistent, so use $cputype instead. 386
        # is converted to i386 for consistency with other x86
        # operating systems.
-       if test "$cputype" = "386"; then
+       if test "$cputype" = 386; then
            UNAME_MACHINE=i386
        else
            UNAME_MACHINE="$cputype"
@@ -1358,7 +1392,7 @@ EOF
        echo i386-pc-xenix
        exit ;;
     i*86:skyos:*:*)
-       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
        exit ;;
     i*86:rdos:*:*)
        echo ${UNAME_MACHINE}-pc-rdos
@@ -1369,23 +1403,25 @@ EOF
     x86_64:VMkernel:*:*)
        echo ${UNAME_MACHINE}-unknown-esx
        exit ;;
+    amd64:Isilon\ OneFS:*:*)
+       echo x86_64-unknown-onefs
+       exit ;;
 esac
 
 cat >&2 <<EOF
 $0: unable to guess system type
 
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite
+config.guess and config.sub with the latest versions from:
 
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
 
 config.guess timestamp = $timestamp
 
index bba4efb..9feb73b 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2014 Free Software Foundation, Inc.
+#   Copyright 1992-2016 Free Software Foundation, Inc.
 
-timestamp='2014-09-11'
+timestamp='2016-06-20'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ timestamp='2014-09-11'
 # of the GNU General Public License, version 3 ("GPLv3").
 
 
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -33,7 +33,7 @@ timestamp='2014-09-11'
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
@@ -53,8 +53,7 @@ timestamp='2014-09-11'
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
 
 Canonicalize a configuration name.
 
@@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2014 Free Software Foundation, Inc.
+Copyright 1992-2016 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -117,7 +116,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -255,12 +254,13 @@ case $basic_machine in
        | arc | arceb \
        | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
        | avr | avr32 \
+       | ba \
        | be32 | be64 \
        | bfin \
        | c4x | c8051 | clipper \
        | d10v | d30v | dlx | dsp16xx \
-       | epiphany \
-       | fido | fr30 | frv \
+       | e2k | epiphany \
+       | fido | fr30 | frv | ft32 \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | hexagon \
        | i370 | i860 | i960 | ia64 \
@@ -305,7 +305,7 @@ case $basic_machine in
        | riscv32 | riscv64 \
        | rl78 | rx \
        | score \
-       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -313,6 +313,7 @@ case $basic_machine in
        | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
        | ubicom32 \
        | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+       | visium \
        | we32k \
        | x86 | xc16x | xstormy16 | xtensa \
        | z8k | z80)
@@ -327,6 +328,9 @@ case $basic_machine in
        c6x)
                basic_machine=tic6x-unknown
                ;;
+       leon|leon[3-9])
+               basic_machine=sparc-$basic_machine
+               ;;
        m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
                basic_machine=$basic_machine-unknown
                os=-none
@@ -372,12 +376,13 @@ case $basic_machine in
        | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
+       | ba-* \
        | be32-* | be64-* \
        | bfin-* | bs2000-* \
        | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | c8051-* | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
-       | elxsi-* \
+       | e2k-* | elxsi-* \
        | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
@@ -424,12 +429,13 @@ case $basic_machine in
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
        | pyramid-* \
+       | riscv32-* | riscv64-* \
        | rl78-* | romp-* | rs6000-* | rx-* \
        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
        | tahoe-* \
        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
        | tile*-* \
@@ -437,6 +443,7 @@ case $basic_machine in
        | ubicom32-* \
        | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
        | vax-* \
+       | visium-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* \
        | xstormy16-* | xtensa*-* \
@@ -513,6 +520,9 @@ case $basic_machine in
                basic_machine=i386-pc
                os=-aros
                ;;
+       asmjs)
+               basic_machine=asmjs-unknown
+               ;;
        aux)
                basic_machine=m68k-apple
                os=-aux
@@ -633,6 +643,14 @@ case $basic_machine in
                basic_machine=m68k-bull
                os=-sysv3
                ;;
+       e500v[12])
+               basic_machine=powerpc-unknown
+               os=$os"spe"
+               ;;
+       e500v[12]-*)
+               basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=$os"spe"
+               ;;
        ebmon29k)
                basic_machine=a29k-amd
                os=-ebmon
@@ -774,6 +792,9 @@ case $basic_machine in
                basic_machine=m68k-isi
                os=-sysv
                ;;
+       leon-*|leon[3-9]-*)
+               basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+               ;;
        m68knommu)
                basic_machine=m68k-unknown
                os=-linux
@@ -1365,18 +1386,18 @@ case $os in
              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
              | -sym* | -kopensolaris* | -plan9* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* | -aros* \
+             | -aos* | -aros* | -cloudabi* | -sortix* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-             | -bitrig* | -openbsd* | -solidbsd* \
+             | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
              | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+             | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
              | -linux-newlib* | -linux-musl* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
@@ -1385,7 +1406,8 @@ case $os in
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+             | -onefs* | -tirtos* | -phoenix*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1517,6 +1539,8 @@ case $os in
                ;;
        -nacl*)
                ;;
+       -ios)
+               ;;
        -none)
                ;;
        *)
index 595378f..f293156 100644 (file)
@@ -1 +1 @@
-3002000
+3002001
index af140e0..9ef75a6 100644 (file)
@@ -42,10 +42,10 @@ __FBSDID("$FreeBSD$");
 
 #define        BYTES_PER_BLOCK (20*512)
 
-struct archive *a;
-struct archive_entry *ae;
-char *bsdcat_current_path;
-int exit_status = 0;
+static struct archive *a;
+static struct archive_entry *ae;
+static const char *bsdcat_current_path;
+static int exit_status = 0;
 
 
 void
@@ -68,7 +68,7 @@ version(void)
 }
 
 void
-bsdcat_next()
+bsdcat_next(void)
 {
        a = archive_read_new();
        archive_read_support_filter_all(a);
@@ -85,7 +85,7 @@ bsdcat_print_error(void)
 }
 
 void
-bsdcat_read_to_stdout(char* filename)
+bsdcat_read_to_stdout(const char* filename)
 {
        int r;
 
index ca603d3..2e055e7 100644 (file)
@@ -53,4 +53,4 @@ int bsdcat_getopt(struct bsdcat *);
 void usage(FILE *stream, int eval);
 void bsdcat_next(void);
 void bsdcat_print_error(void);
-void bsdcat_read_to_stdout(char* filename);
+void bsdcat_read_to_stdout(const char* filename);
index 319f68c..0aa1deb 100644 (file)
@@ -2534,18 +2534,36 @@ usage(const char *program)
 static char *
 get_refdir(const char *d)
 {
-       char tried[512] = { '\0' };
-       char buff[128];
-       char *pwd, *p;
+       size_t tried_size, buff_size;
+       char *buff, *tried, *pwd = NULL, *p = NULL;
+
+#ifdef PATH_MAX
+       buff_size = PATH_MAX;
+#else
+       buff_size = 8192;
+#endif
+       buff = calloc(buff_size, 1);
+       if (buff == NULL) {
+               fprintf(stderr, "Unable to allocate memory\n");
+               exit(1);
+       }
+
+       /* Allocate a buffer to hold the various directories we checked. */
+       tried_size = buff_size * 2;
+       tried = calloc(tried_size, 1);
+       if (tried == NULL) {
+               fprintf(stderr, "Unable to allocate memory\n");
+               exit(1);
+       }
 
        /* If a dir was specified, try that */
        if (d != NULL) {
                pwd = NULL;
-               snprintf(buff, sizeof(buff), "%s", d);
+               snprintf(buff, buff_size, "%s", d);
                p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
                if (p != NULL) goto success;
-               strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-               strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+               strncat(tried, buff, tried_size - strlen(tried) - 1);
+               strncat(tried, "\n", tried_size - strlen(tried) - 1);
                goto failure;
        }
 
@@ -2559,48 +2577,48 @@ get_refdir(const char *d)
                pwd[strlen(pwd) - 1] = '\0';
 
        /* Look for a known file. */
-       snprintf(buff, sizeof(buff), "%s", pwd);
+       snprintf(buff, buff_size, "%s", pwd);
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
-       snprintf(buff, sizeof(buff), "%s/test", pwd);
+       snprintf(buff, buff_size, "%s/test", pwd);
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
 #if defined(LIBRARY)
-       snprintf(buff, sizeof(buff), "%s/%s/test", pwd, LIBRARY);
+       snprintf(buff, buff_size, "%s/%s/test", pwd, LIBRARY);
 #else
-       snprintf(buff, sizeof(buff), "%s/%s/test", pwd, PROGRAM);
+       snprintf(buff, buff_size, "%s/%s/test", pwd, PROGRAM);
 #endif
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
 #if defined(PROGRAM_ALIAS)
-       snprintf(buff, sizeof(buff), "%s/%s/test", pwd, PROGRAM_ALIAS);
+       snprintf(buff, buff_size, "%s/%s/test", pwd, PROGRAM_ALIAS);
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 #endif
 
        if (memcmp(pwd, "/usr/obj", 8) == 0) {
-               snprintf(buff, sizeof(buff), "%s", pwd + 8);
+               snprintf(buff, buff_size, "%s", pwd + 8);
                p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
                if (p != NULL) goto success;
-               strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-               strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+               strncat(tried, buff, tried_size - strlen(tried) - 1);
+               strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
-               snprintf(buff, sizeof(buff), "%s/test", pwd + 8);
+               snprintf(buff, buff_size, "%s/test", pwd + 8);
                p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
                if (p != NULL) goto success;
-               strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-               strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+               strncat(tried, buff, tried_size - strlen(tried) - 1);
+               strncat(tried, "\n", tried_size - strlen(tried) - 1);
        }
 
 failure:
@@ -2615,7 +2633,12 @@ failure:
 success:
        free(p);
        free(pwd);
-       return strdup(buff);
+       free(tried);
+
+       /* Copy result into a fresh buffer to reduce memory usage. */
+       p = strdup(buff);
+       free(buff);
+       return p;
 }
 
 int
index 642e409..f5bc56f 100644 (file)
 /* Define to 1 if you have the <lzma.h> header file. */
 #undef HAVE_LZMA_H
 
+/* Define to 1 if you have the `lzma_stream_encoder_mt' function. */
+#undef HAVE_LZMA_STREAM_ENCODER_MT
+
 /* Define to 1 if you have the <lzo/lzo1x.h> header file. */
 #undef HAVE_LZO_LZO1X_H
 
index cb9932a..892401d 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libarchive 3.2.0.
+# Generated by GNU Autoconf 2.69 for libarchive 3.2.1.
 #
 # Report bugs to <libarchive-discuss@googlegroups.com>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='libarchive'
 PACKAGE_TARNAME='libarchive'
-PACKAGE_VERSION='3.2.0'
-PACKAGE_STRING='libarchive 3.2.0'
+PACKAGE_VERSION='3.2.1'
+PACKAGE_STRING='libarchive 3.2.1'
 PACKAGE_BUGREPORT='libarchive-discuss@googlegroups.com'
 PACKAGE_URL=''
 
@@ -1366,7 +1366,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libarchive 3.2.0 to adapt to many kinds of systems.
+\`configure' configures libarchive 3.2.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1436,7 +1436,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libarchive 3.2.0:";;
+     short | recursive ) echo "Configuration of libarchive 3.2.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1479,8 +1479,8 @@ Optional Features:
                           use libpcreposix POSIX regular expression support
     --disable-posix-regex-lib
                           don't enable POSIX regular expression support
-  --disable-xattr         Enable Extended Attributes support (default: check)
-  --disable-acl           Enable ACL support (default: check)
+  --disable-xattr         Disable Extended Attributes support (default: check)
+  --disable-acl           Disable ACL support (default: check)
   --disable-largefile     omit support for large files
 
 Optional Packages:
@@ -1592,7 +1592,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libarchive configure 3.2.0
+libarchive configure 3.2.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2431,7 +2431,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libarchive $as_me 3.2.0, which was
+It was created by libarchive $as_me 3.2.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3300,7 +3300,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='libarchive'
- VERSION='3.2.0'
+ VERSION='3.2.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3437,7 +3437,7 @@ AM_BACKSLASH='\'
 
 # Libtool interface version bumps on any API change, so increments
 # whenever libarchive minor version does.
-ARCHIVE_MINOR=$(( (3002000 / 1000) % 1000 ))
+ARCHIVE_MINOR=$(( (3002001 / 1000) % 1000 ))
 # Libarchive 2.7 == libtool interface 9 = 2 + 7
 # Libarchive 2.8 == libtool interface 10 = 2 + 8
 # Libarchive 2.9 == libtool interface 11 = 2 + 8
@@ -3445,37 +3445,37 @@ ARCHIVE_MINOR=$(( (3002000 / 1000) % 1000 ))
 # Libarchive 3.1 == libtool interface 13
 ARCHIVE_INTERFACE=`echo $((13 + ${ARCHIVE_MINOR}))`
 # Libarchive revision is bumped on any source change === libtool revision
-ARCHIVE_REVISION=$(( 3002000 % 1000 ))
+ARCHIVE_REVISION=$(( 3002001 % 1000 ))
 # Libarchive minor is bumped on any interface addition === libtool age
 ARCHIVE_LIBTOOL_VERSION=$ARCHIVE_INTERFACE:$ARCHIVE_REVISION:$ARCHIVE_MINOR
 
 # Stick the version numbers into config.h
 
-$as_echo "#define LIBARCHIVE_VERSION_STRING \"3.2.0\"" >>confdefs.h
+$as_echo "#define LIBARCHIVE_VERSION_STRING \"3.2.1\"" >>confdefs.h
 
 
 cat >>confdefs.h <<_ACEOF
-#define LIBARCHIVE_VERSION_NUMBER "3002000"
+#define LIBARCHIVE_VERSION_NUMBER "3002001"
 _ACEOF
 
 
-$as_echo "#define BSDCPIO_VERSION_STRING \"3.2.0\"" >>confdefs.h
+$as_echo "#define BSDCPIO_VERSION_STRING \"3.2.1\"" >>confdefs.h
 
 
-$as_echo "#define BSDTAR_VERSION_STRING \"3.2.0\"" >>confdefs.h
+$as_echo "#define BSDTAR_VERSION_STRING \"3.2.1\"" >>confdefs.h
 
 
-$as_echo "#define BSDCAT_VERSION_STRING \"3.2.0\"" >>confdefs.h
+$as_echo "#define BSDCAT_VERSION_STRING \"3.2.1\"" >>confdefs.h
 
 
 # The shell variables here must be the same as the AC_SUBST() variables
 # below, but the shell variable names apparently cannot be the same as
 # the m4 macro names above.  Why?  Ask autoconf.
-BSDCPIO_VERSION_STRING=3.2.0
-BSDTAR_VERSION_STRING=3.2.0
-BSDCAT_VERSION_STRING=3.2.0
-LIBARCHIVE_VERSION_STRING=3.2.0
-LIBARCHIVE_VERSION_NUMBER=3002000
+BSDCPIO_VERSION_STRING=3.2.1
+BSDTAR_VERSION_STRING=3.2.1
+BSDCAT_VERSION_STRING=3.2.1
+LIBARCHIVE_VERSION_STRING=3.2.1
+LIBARCHIVE_VERSION_NUMBER=3002001
 
 # Substitute the above version numbers into the various files below.
 # Yes, I believe this is the fourth time we define what are essentially
@@ -13018,7 +13018,7 @@ $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
 
 fi
 
-for ac_header in acl/libacl.h attr/xattr.h copyfile.h ctype.h
+for ac_header in copyfile.h ctype.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -13145,7 +13145,7 @@ fi
 
 done
 
-for ac_header in sys/acl.h sys/cdefs.h sys/extattr.h
+for ac_header in sys/cdefs.h sys/extattr.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -14750,6 +14750,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lzma_has_mt" >&5
 $as_echo "$ac_cv_lzma_has_mt" >&6; }
+  if test "x$ac_cv_lzma_has_mt" != xno; then
+
+$as_echo "#define HAVE_LZMA_STREAM_ENCODER_MT 1" >>confdefs.h
+
+  fi
 fi
 
 
 
 
 if test "x$enable_acl" != "xno"; then
+   for ac_header in acl/libacl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
+if test "x$ac_cv_header_acl_libacl_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_ACL_LIBACL_H 1
+_ACEOF
+
+fi
+
+done
+
    for ac_header in sys/acl.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
@@ -20505,7 +20522,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libarchive $as_me 3.2.0, which was
+This file was extended by libarchive $as_me 3.2.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20571,7 +20588,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libarchive config.status 3.2.0
+libarchive config.status 3.2.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 1ab54cb..e15ceee 100644 (file)
@@ -4,8 +4,8 @@ dnl First, define all of the version numbers up front.
 dnl In particular, this allows the version macro to be used in AC_INIT
 
 dnl These first two version numbers are updated automatically on each release.
-m4_define([LIBARCHIVE_VERSION_S],[3.2.0])
-m4_define([LIBARCHIVE_VERSION_N],[3002000])
+m4_define([LIBARCHIVE_VERSION_S],[3.2.1])
+m4_define([LIBARCHIVE_VERSION_N],[3002001])
 
 dnl bsdtar and bsdcpio versioning tracks libarchive
 m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S())
@@ -252,7 +252,7 @@ esac
 # Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([acl/libacl.h attr/xattr.h copyfile.h ctype.h])
+AC_CHECK_HEADERS([copyfile.h ctype.h])
 AC_CHECK_HEADERS([errno.h ext2fs/ext2_fs.h fcntl.h grp.h])
 
 AC_CACHE_CHECK([whether EXT2_IOC_GETFLAGS is usable],
@@ -272,7 +272,7 @@ AC_CHECK_HEADERS([linux/fiemap.h linux/fs.h linux/magic.h linux/types.h])
 AC_CHECK_HEADERS([locale.h paths.h poll.h pthread.h pwd.h])
 AC_CHECK_HEADERS([readpassphrase.h signal.h spawn.h])
 AC_CHECK_HEADERS([stdarg.h stdint.h stdlib.h string.h])
-AC_CHECK_HEADERS([sys/acl.h sys/cdefs.h sys/extattr.h])
+AC_CHECK_HEADERS([sys/cdefs.h sys/extattr.h])
 AC_CHECK_HEADERS([sys/ioctl.h sys/mkdev.h sys/mount.h])
 AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/select.h sys/statfs.h sys/statvfs.h])
 AC_CHECK_HEADERS([sys/time.h sys/utime.h sys/utsname.h sys/vfs.h])
@@ -377,6 +377,9 @@ if test "x$with_lzma" != "xno"; then
       AC_LANG_PROGRAM([[#include <lzma.h>]],
                       [[lzma_stream_encoder_mt(0, 0);]])],
       [ac_cv_lzma_has_mt=yes], [ac_cv_lzma_has_mt=no])])
+  if test "x$ac_cv_lzma_has_mt" != xno; then
+         AC_DEFINE([HAVE_LZMA_STREAM_ENCODER_MT], [1], [Define to 1 if you have the `lzma_stream_encoder_mt' function.])
+  fi
 fi
 
 AC_ARG_WITH([lzo2],
@@ -641,7 +644,7 @@ AC_CHECK_MEMBER(struct dirent.d_namlen,,,
 # Check for Extended Attributes support
 AC_ARG_ENABLE([xattr],
                AS_HELP_STRING([--disable-xattr],
-               [Enable Extended Attributes support (default: check)]))
+               [Disable Extended Attributes support (default: check)]))
 
 if test "x$enable_xattr" != "xno"; then
        AC_CHECK_HEADERS([attr/xattr.h])
@@ -667,9 +670,10 @@ fi
 #
 AC_ARG_ENABLE([acl],
                AS_HELP_STRING([--disable-acl],
-               [Enable ACL support (default: check)]))
+               [Disable ACL support (default: check)]))
 
 if test "x$enable_acl" != "xno"; then
+   AC_CHECK_HEADERS([acl/libacl.h])
    AC_CHECK_HEADERS([sys/acl.h])
    AC_CHECK_LIB([acl],[acl_get_file])
    AC_CHECK_FUNCS([acl_create_entry acl_init acl_set_fd acl_set_fd_np acl_set_file])
index b267e9b..4b69893 100644 (file)
@@ -295,6 +295,7 @@ main(int argc, char *argv[])
                                    "Cannot use both -p and -%c", cpio->mode);
                        cpio->mode = opt;
                        cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NODOTDOT;
+                       cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS;
                        break;
                case OPTION_PASSPHRASE:
                        cpio->passphrase = cpio->argument;
index f2c2754..e3063ee 100644 (file)
@@ -25,6 +25,7 @@ IF(ENABLE_CPIO AND ENABLE_TEST)
     test_extract_cpio_xz
     test_format_newc.c
     test_gcpio_compat.c
+    test_missing_file.c
     test_option_0.c
     test_option_B_upper.c
     test_option_C_upper.c
index a4521bb..9968c4d 100644 (file)
@@ -13,6 +13,7 @@ DEFINE_TEST(test_extract_cpio_xz)
 DEFINE_TEST(test_extract_cpio_Z)
 DEFINE_TEST(test_format_newc)
 DEFINE_TEST(test_gcpio_compat)
+DEFINE_TEST(test_missing_file)
 DEFINE_TEST(test_option_0)
 DEFINE_TEST(test_option_a)
 DEFINE_TEST(test_option_b64encode)
index fa22adf..1c9ae6e 100644 (file)
@@ -2535,18 +2535,36 @@ usage(const char *program)
 static char *
 get_refdir(const char *d)
 {
-       char tried[512] = { '\0' };
-       char buff[128];
-       char *pwd, *p;
+       size_t tried_size, buff_size;
+       char *buff, *tried, *pwd = NULL, *p = NULL;
+
+#ifdef PATH_MAX
+       buff_size = PATH_MAX;
+#else
+       buff_size = 8192;
+#endif
+       buff = calloc(buff_size, 1);
+       if (buff == NULL) {
+               fprintf(stderr, "Unable to allocate memory\n");
+               exit(1);
+       }
+
+       /* Allocate a buffer to hold the various directories we checked. */
+       tried_size = buff_size * 2;
+       tried = calloc(tried_size, 1);
+       if (tried == NULL) {
+               fprintf(stderr, "Unable to allocate memory\n");
+               exit(1);
+       }
 
        /* If a dir was specified, try that */
        if (d != NULL) {
                pwd = NULL;
-               snprintf(buff, sizeof(buff), "%s", d);
+               snprintf(buff, buff_size, "%s", d);
                p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
                if (p != NULL) goto success;
-               strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-               strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+               strncat(tried, buff, tried_size - strlen(tried) - 1);
+               strncat(tried, "\n", tried_size - strlen(tried) - 1);
                goto failure;
        }
 
@@ -2560,48 +2578,48 @@ get_refdir(const char *d)
                pwd[strlen(pwd) - 1] = '\0';
 
        /* Look for a known file. */
-       snprintf(buff, sizeof(buff), "%s", pwd);
+       snprintf(buff, buff_size, "%s", pwd);
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
-       snprintf(buff, sizeof(buff), "%s/test", pwd);
+       snprintf(buff, buff_size, "%s/test", pwd);
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
 #if defined(LIBRARY)
-       snprintf(buff, sizeof(buff), "%s/%s/test", pwd, LIBRARY);
+       snprintf(buff, buff_size, "%s/%s/test", pwd, LIBRARY);
 #else
-       snprintf(buff, sizeof(buff), "%s/%s/test", pwd, PROGRAM);
+       snprintf(buff, buff_size, "%s/%s/test", pwd, PROGRAM);
 #endif
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
 #if defined(PROGRAM_ALIAS)
-       snprintf(buff, sizeof(buff), "%s/%s/test", pwd, PROGRAM_ALIAS);
+       snprintf(buff, buff_size, "%s/%s/test", pwd, PROGRAM_ALIAS);
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 #endif
 
        if (memcmp(pwd, "/usr/obj", 8) == 0) {
-               snprintf(buff, sizeof(buff), "%s", pwd + 8);
+               snprintf(buff, buff_size, "%s", pwd + 8);
                p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
                if (p != NULL) goto success;
-               strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-               strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+               strncat(tried, buff, tried_size - strlen(tried) - 1);
+               strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
-               snprintf(buff, sizeof(buff), "%s/test", pwd + 8);
+               snprintf(buff, buff_size, "%s/test", pwd + 8);
                p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
                if (p != NULL) goto success;
-               strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-               strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+               strncat(tried, buff, tried_size - strlen(tried) - 1);
+               strncat(tried, "\n", tried_size - strlen(tried) - 1);
        }
 
 failure:
@@ -2616,7 +2634,12 @@ failure:
 success:
        free(p);
        free(pwd);
-       return strdup(buff);
+       free(tried);
+
+       /* Copy result into a fresh buffer to reduce memory usage. */
+       p = strdup(buff);
+       free(buff);
+       return p;
 }
 
 int
diff --git a/cpio/test/test_missing_file.c b/cpio/test/test_missing_file.c
new file mode 100644 (file)
index 0000000..a908f53
--- /dev/null
@@ -0,0 +1,52 @@
+/*-
+ * Copyright (c) 2016 Tim Kientzle
+ * 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.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+DEFINE_TEST(test_missing_file)
+{
+       int r;
+
+       assertMakeFile("file1", 0644, "file1");
+       assertMakeFile("file2", 0644, "file2");
+
+       assertMakeFile("filelist1", 0644, "file1\nfile2\n");
+       r = systemf("%s -o <filelist1 >stdout1 2>stderr1", testprog);
+       assertEqualInt(r, 0);
+       assertTextFileContents("1 block\n", "stderr1");
+
+       assertMakeFile("filelist2", 0644, "file1\nfile2\nfile3\n");
+       r = systemf("%s -o <filelist2 >stdout2 2>stderr2", testprog);
+       assert(r != 0);
+
+       assertMakeFile("filelist3", 0644, "");
+       r = systemf("%s -o <filelist3 >stdout3 2>stderr3", testprog);
+       assertEqualInt(r, 0);
+       assertTextFileContents("1 block\n", "stderr3");
+
+       assertMakeFile("filelist4", 0644, "file3\n");
+       r = systemf("%s -o <filelist4 >stdout4 2>stderr4", testprog);
+       assert(r != 0);
+}
index dc95683..2c1de49 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:20 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:05 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index a87d7df..f4068d3 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:20 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:05 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 3ae9154..2e7af8b 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:20 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index e00bde4..4e7d559 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:21 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index fb98580..a20c6c8 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:21 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index c13b748..be32b92 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:21 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 4d9ba36..a385f50 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:21 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index d5493dd..2f1a80e 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:21 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 3a4c4f8..7d32eea 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:21 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 5096244..4ca22ad 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:21 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index d132218..c2a782a 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:21 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 4a8298c..5928645 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:21 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index d65dfae..2e14347 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:21 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index d50257e..548eed9 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:22 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 87a3ad5..49a21ef 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:22 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index b7a56a2..7c16ef9 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:22 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 578bac4..d415322 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:22 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 48b7c11..41097e8 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:22 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 3aec20d..8e7f182 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:22 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 3fad932..ab0c3f0 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:22 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index fa4c392..44c8e42 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:22 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 211ff53..2ddd3a5 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:22 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 8be96f5..a4542eb 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:22 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index ec97740..0e976b4 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:22 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index c569172..c66133a 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:22 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
@@ -40,7 +40,8 @@ ARCHIVE_WRITE_FILTER(3)</p>
 <b>archive_write_add_filter_none</b>,
 <b>archive_write_add_filter_program</b>,
 <b>archive_write_add_filter_uuencode</b>,
-<b>archive_write_add_filter_xz</b></p>
+<b>archive_write_add_filter_xz</b> &mdash; functions
+enabling output filters</p>
 
 <p style="margin-top: 1em"><b>LIBRARY</b></p>
 
index 9e3f45c..bf63015 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:23 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index fadedbb..09d6147 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:23 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index de12d63..b65a085 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:23 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 7adfbed..404075a 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:23 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 9ec2d6f..1cd3e06 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:23 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 53b9869..5c69284 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:23 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 9b8e784..50e1731 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:23 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
@@ -30,7 +30,7 @@ ARCHIVE_WRITE_OPTIONS(3)</p>
 <b>archive_write_set_format_option</b>,
 <b>archive_write_set_option</b>,
 <b>archive_write_set_options</b> &mdash; functions
-controlling options for reading archives</p>
+controlling options for writing archives</p>
 
 <p style="margin-top: 1em"><b>LIBRARY</b></p>
 
index fcb4495..94e90b3 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:23 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index eaa8d52..31c9378 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:25 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:10 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 012a5e3..92e798a 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:25 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:10 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index b7eebbe..a532116 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:23 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 2db8476..2298d6b 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:24 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index e66806b..a128625 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:23 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 16b3c80..76b6232 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:24 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
@@ -25,8 +25,8 @@ LIBARCHIVE_CHANGES(3)</p>
 
 <p style="margin-top: 1em"><b>NAME</b></p>
 
-<p style="margin-left:6%;"><b>changes in libarchive
-interface</b></p>
+<p style="margin-left:6%;">&mdash; changes in libarchive
+interface</p>
 
 <p style="margin-top: 1em"><b>CHANGES IN LIBARCHIVE
 3</b></p>
index 8230dfa..4b9aa52 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:24 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 90981b9..5f37ee9 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:24 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index afb8c06..c30306d 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.22.3 -->
-<!-- CreationDate: Fri Apr 29 22:04:24 2016 -->
+<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <html>
index 98ab4b1..3542960 100644 (file)
@@ -16,6 +16,7 @@
 \fB\%archive_write_add_filter_program\fP,
 \fB\%archive_write_add_filter_uuencode\fP,
 \fB\%archive_write_add_filter_xz\fP
+\- functions enabling output filters
 .SH LIBRARY
 .ad l
 Streaming Archive Library (libarchive, -larchive)
index d3aa42e..43b41a7 100644 (file)
@@ -5,7 +5,7 @@
 \fB\%archive_write_set_format_option\fP,
 \fB\%archive_write_set_option\fP,
 \fB\%archive_write_set_options\fP
-\- functions controlling options for reading archives
+\- functions controlling options for writing archives
 .SH LIBRARY
 .ad l
 Streaming Archive Library (libarchive, -larchive)
index ca3e336..9c8e843 100644 (file)
@@ -39,7 +39,6 @@ Later variants have extended this by either appropriating undefined
 areas of the header record, extending the header to multiple records,
 or by storing special entries that modify the interpretation of
 subsequent entries.
-.PP
 .RS 5
 .TP
 \fBgnutar\fP
index f35e367..e3ecb31 100644 (file)
@@ -1,7 +1,7 @@
 .TH LIBARCHIVE_CHANGES 3 "December 23, 2011" ""
 .SH NAME
 .ad l
-\fB\%changes\fP in libarchive interface
+\- changes in libarchive interface
 .SH CHANGES IN LIBARCHIVE 3
 .ad l
 This page describes user-visible changes in libarchive3, and lists
index 583d8a0..a347a71 100644 (file)
Binary files a/doc/pdf/archive_entry.3.pdf and b/doc/pdf/archive_entry.3.pdf differ
index 0e73e7c..39e81a7 100644 (file)
Binary files a/doc/pdf/archive_entry_acl.3.pdf and b/doc/pdf/archive_entry_acl.3.pdf differ
index b973de6..d950391 100644 (file)
Binary files a/doc/pdf/archive_entry_linkify.3.pdf and b/doc/pdf/archive_entry_linkify.3.pdf differ
index b8ea16a..fcab5e7 100644 (file)
Binary files a/doc/pdf/archive_entry_paths.3.pdf and b/doc/pdf/archive_entry_paths.3.pdf differ
index b0996dd..2b10ae2 100644 (file)
Binary files a/doc/pdf/archive_entry_perms.3.pdf and b/doc/pdf/archive_entry_perms.3.pdf differ
index 9950064..6318911 100644 (file)
Binary files a/doc/pdf/archive_entry_stat.3.pdf and b/doc/pdf/archive_entry_stat.3.pdf differ
index d7cd0e3..4c4fbfd 100644 (file)
Binary files a/doc/pdf/archive_entry_time.3.pdf and b/doc/pdf/archive_entry_time.3.pdf differ
index 9e7fbb1..002f7a1 100644 (file)
Binary files a/doc/pdf/archive_read.3.pdf and b/doc/pdf/archive_read.3.pdf differ
index bc70d4a..7015dc0 100644 (file)
Binary files a/doc/pdf/archive_read_add_passphrase.3.pdf and b/doc/pdf/archive_read_add_passphrase.3.pdf differ
index f512940..8c4343c 100644 (file)
Binary files a/doc/pdf/archive_read_data.3.pdf and b/doc/pdf/archive_read_data.3.pdf differ
index d0ea413..d70ee33 100644 (file)
Binary files a/doc/pdf/archive_read_disk.3.pdf and b/doc/pdf/archive_read_disk.3.pdf differ
index e3536e2..2e81c8b 100644 (file)
Binary files a/doc/pdf/archive_read_extract.3.pdf and b/doc/pdf/archive_read_extract.3.pdf differ
index e683060..cfa1530 100644 (file)
Binary files a/doc/pdf/archive_read_filter.3.pdf and b/doc/pdf/archive_read_filter.3.pdf differ
index d4b118f..0c9e148 100644 (file)
Binary files a/doc/pdf/archive_read_format.3.pdf and b/doc/pdf/archive_read_format.3.pdf differ
index 2bbb5bc..cc9276e 100644 (file)
Binary files a/doc/pdf/archive_read_free.3.pdf and b/doc/pdf/archive_read_free.3.pdf differ
index 3f896be..4581a74 100644 (file)
Binary files a/doc/pdf/archive_read_header.3.pdf and b/doc/pdf/archive_read_header.3.pdf differ
index 749e5b4..d94331d 100644 (file)
Binary files a/doc/pdf/archive_read_new.3.pdf and b/doc/pdf/archive_read_new.3.pdf differ
index 2e370aa..544d558 100644 (file)
Binary files a/doc/pdf/archive_read_open.3.pdf and b/doc/pdf/archive_read_open.3.pdf differ
index a28e537..f1da66a 100644 (file)
Binary files a/doc/pdf/archive_read_set_options.3.pdf and b/doc/pdf/archive_read_set_options.3.pdf differ
index d20778a..e7b0ce1 100644 (file)
Binary files a/doc/pdf/archive_util.3.pdf and b/doc/pdf/archive_util.3.pdf differ
index d7cbe2c..45fec5a 100644 (file)
Binary files a/doc/pdf/archive_write.3.pdf and b/doc/pdf/archive_write.3.pdf differ
index 891c70e..377debe 100644 (file)
Binary files a/doc/pdf/archive_write_blocksize.3.pdf and b/doc/pdf/archive_write_blocksize.3.pdf differ
index 02d4ab8..df28a12 100644 (file)
Binary files a/doc/pdf/archive_write_data.3.pdf and b/doc/pdf/archive_write_data.3.pdf differ
index e51f385..edbbcf6 100644 (file)
Binary files a/doc/pdf/archive_write_disk.3.pdf and b/doc/pdf/archive_write_disk.3.pdf differ
index 5dba3c8..cfd8847 100644 (file)
Binary files a/doc/pdf/archive_write_filter.3.pdf and b/doc/pdf/archive_write_filter.3.pdf differ
index d3323ca..b14ae31 100644 (file)
Binary files a/doc/pdf/archive_write_finish_entry.3.pdf and b/doc/pdf/archive_write_finish_entry.3.pdf differ
index 130cd7e..541d41b 100644 (file)
Binary files a/doc/pdf/archive_write_format.3.pdf and b/doc/pdf/archive_write_format.3.pdf differ
index eb4ac2e..23ba1d2 100644 (file)
Binary files a/doc/pdf/archive_write_free.3.pdf and b/doc/pdf/archive_write_free.3.pdf differ
index 58a27ed..be13576 100644 (file)
Binary files a/doc/pdf/archive_write_header.3.pdf and b/doc/pdf/archive_write_header.3.pdf differ
index 9543afe..282b900 100644 (file)
Binary files a/doc/pdf/archive_write_new.3.pdf and b/doc/pdf/archive_write_new.3.pdf differ
index 2f067e0..7e95664 100644 (file)
Binary files a/doc/pdf/archive_write_open.3.pdf and b/doc/pdf/archive_write_open.3.pdf differ
index accd206..8befb4b 100644 (file)
Binary files a/doc/pdf/archive_write_set_options.3.pdf and b/doc/pdf/archive_write_set_options.3.pdf differ
index 47e6e49..31a3881 100644 (file)
Binary files a/doc/pdf/archive_write_set_passphrase.3.pdf and b/doc/pdf/archive_write_set_passphrase.3.pdf differ
index f192ee4..a5ddd70 100644 (file)
Binary files a/doc/pdf/bsdcpio.1.pdf and b/doc/pdf/bsdcpio.1.pdf differ
index 287bf46..42ab827 100644 (file)
Binary files a/doc/pdf/bsdtar.1.pdf and b/doc/pdf/bsdtar.1.pdf differ
index a2f3166..e6f548e 100644 (file)
Binary files a/doc/pdf/cpio.5.pdf and b/doc/pdf/cpio.5.pdf differ
index 835bef9..d3609b2 100644 (file)
Binary files a/doc/pdf/libarchive-formats.5.pdf and b/doc/pdf/libarchive-formats.5.pdf differ
index 6a1ef8d..5bc1464 100644 (file)
Binary files a/doc/pdf/libarchive.3.pdf and b/doc/pdf/libarchive.3.pdf differ
index f3c124e..9fe90ec 100644 (file)
Binary files a/doc/pdf/libarchive_changes.3.pdf and b/doc/pdf/libarchive_changes.3.pdf differ
index cc29cbc..0a2ab71 100644 (file)
Binary files a/doc/pdf/libarchive_internals.3.pdf and b/doc/pdf/libarchive_internals.3.pdf differ
index d5d28e2..4f2eb90 100644 (file)
Binary files a/doc/pdf/mtree.5.pdf and b/doc/pdf/mtree.5.pdf differ
index 5aa66a3..997af2a 100644 (file)
Binary files a/doc/pdf/tar.5.pdf and b/doc/pdf/tar.5.pdf differ
index f39064a..f6e8be6 100644 (file)
@@ -8,7 +8,7 @@ NAME
      archive_write_add_filter_lzip, archive_write_add_filter_lzma,
      archive_write_add_filter_lzop, archive_write_add_filter_none,
      archive_write_add_filter_program, archive_write_add_filter_uuencode,
-     archive_write_add_filter_xz
+     archive_write_add_filter_xz — functions enabling output filters
 
 LIBRARY
      Streaming Archive Library (libarchive, -larchive)
index 3c002f1..2a10224 100644 (file)
@@ -3,7 +3,7 @@ ARCHIVE_WRITE_OPTIONS(3) BSD Library Functions Manual ARCHIVE_WRITE_OPTIONS(3)
 NAME
      archive_write_set_filter_option, archive_write_set_format_option,
      archive_write_set_option, archive_write_set_options — functions control‐
-     ling options for reading archives
+     ling options for writing archives
 
 LIBRARY
      Streaming Archive Library (libarchive, -larchive)
index fe4f80e..dbd3568 100644 (file)
@@ -1,7 +1,7 @@
 LIBARCHIVE_CHANGES(3)   BSD Library Functions Manual    LIBARCHIVE_CHANGES(3)
 
 NAME
-     changes in libarchive interface
+     — changes in libarchive interface
 
 CHANGES IN LIBARCHIVE 3
      This page describes user-visible changes in libarchive3, and lists public
index 3bb4c22..3ec3e46 100644 (file)
@@ -15,6 +15,7 @@ ARCHIVE_WRITE_FILTER(3) manual page
 '''archive_write_add_filter_program''', 
 '''archive_write_add_filter_uuencode''', 
 '''archive_write_add_filter_xz''' 
+- functions enabling output filters 
 == LIBRARY == 
 Streaming Archive Library (libarchive, -larchive) 
 == SYNOPSIS == 
index f9ed600..7c78d80 100644 (file)
@@ -4,7 +4,7 @@ ARCHIVE_WRITE_OPTIONS(3) manual page
 '''archive_write_set_format_option''', 
 '''archive_write_set_option''', 
 '''archive_write_set_options''' 
-- functions controlling options for reading archives 
+- functions controlling options for writing archives 
 == LIBRARY == 
 Streaming Archive Library (libarchive, -larchive) 
 == SYNOPSIS == 
index a31d68f..40e411d 100644 (file)
@@ -1,6 +1,6 @@
 LIBARCHIVE_CHANGES(3) manual page 
 == NAME == 
-'''changes''' in libarchive interface 
+- changes in libarchive interface 
 == CHANGES IN LIBARCHIVE 3 == 
 This page describes user-visible changes in libarchive3, and lists 
 public functions and other symbols changed, deprecated or removed 
index e75f050..e0cbe5f 100644 (file)
@@ -37,7 +37,6 @@ Later variants have extended this by either appropriating undefined
 areas of the header record, extending the header to multiple records, 
 or by storing special entries that modify the interpretation of 
 subsequent entries. 
-
 <dl> 
 <dt>'''gnutar'''</dt><dd> 
 The 
index 59e9ef1..1794dd3 100644 (file)
@@ -36,7 +36,7 @@
  * assert that ARCHIVE_VERSION_NUMBER >= 2012108.
  */
 /* Note: Compiler will complain if this does not match archive_entry.h! */
-#define        ARCHIVE_VERSION_NUMBER 3002000
+#define        ARCHIVE_VERSION_NUMBER 3002001
 
 #include <sys/stat.h>
 #include <stddef.h>  /* for wchar_t */
@@ -155,7 +155,7 @@ __LA_DECL int               archive_version_number(void);
 /*
  * Textual name/version of the library, useful for version displays.
  */
-#define        ARCHIVE_VERSION_ONLY_STRING "3.2.0"
+#define        ARCHIVE_VERSION_ONLY_STRING "3.2.1"
 #define        ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
 __LA_DECL const char * archive_version_string(void);
 
index 423c8d3..dab2c9d 100644 (file)
@@ -29,7 +29,7 @@
 #define        ARCHIVE_ENTRY_H_INCLUDED
 
 /* Note: Compiler will complain if this does not match archive.h! */
-#define        ARCHIVE_VERSION_NUMBER 3002000
+#define        ARCHIVE_VERSION_NUMBER 3002001
 
 /*
  * Note: archive_entry.h is for use outside of libarchive; the
index 05eb90f..5fe726b 100644 (file)
@@ -91,16 +91,11 @@ archive_entry_xattr_add_entry(struct archive_entry *entry,
 {
        struct ae_xattr *xp;
 
-       for (xp = entry->xattr_head; xp != NULL; xp = xp->next)
-               ;
-
        if ((xp = (struct ae_xattr *)malloc(sizeof(struct ae_xattr))) == NULL)
-               /* XXX Error XXX */
-               return;
+               __archive_errx(1, "Out of memory");
 
        if ((xp->name = strdup(name)) == NULL)
-               /* XXX Error XXX */
-               return;
+               __archive_errx(1, "Out of memory");
 
        if ((xp->value = malloc(size)) != NULL) {
                memcpy(xp->value, value, size);
index fe0b031..1aed922 100644 (file)
@@ -126,6 +126,11 @@ static Bool Ppmd7_Alloc(CPpmd7 *p, UInt32 size, ISzAlloc *alloc)
 {
   if (p->Base == 0 || p->Size != size)
   {
+    /* RestartModel() below assumes that p->Size >= UNIT_SIZE
+       (see the calculation of m->MinContext). */
+    if (size < UNIT_SIZE) {
+      return False;
+    }
     Ppmd7_Free(p, alloc);
     p->AlignOffset =
       #ifdef PPMD_32BIT
index 53bd4b8..566d264 100644 (file)
@@ -1586,7 +1586,7 @@ tree_reopen(struct tree *t, const wchar_t *path, int restore_time)
        t->stack->flags = needsFirstVisit;
        /*
         * Debug flag for Direct IO(No buffering) or Async IO.
-        * Those dependant on environment variable switches
+        * Those dependent on environment variable switches
         * will be removed until next release.
         */
        {
index 90901ac..1dfe52b 100644 (file)
@@ -2153,6 +2153,9 @@ read_SubStreamsInfo(struct archive_read *a, struct _7z_substream_info *ss,
                                return (-1);
                        if (UMAX_ENTRY < f[i].numUnpackStreams)
                                return (-1);
+                       if (unpack_streams > SIZE_MAX - UMAX_ENTRY) {
+                               return (-1);
+                       }
                        unpack_streams += (size_t)f[i].numUnpackStreams;
                }
                if ((p = header_bytes(a, 1)) == NULL)
index c2ca85b..b09db0e 100644 (file)
@@ -401,6 +401,11 @@ archive_read_format_cpio_read_header(struct archive_read *a,
 
        /* If this is a symlink, read the link contents. */
        if (archive_entry_filetype(entry) == AE_IFLNK) {
+               if (cpio->entry_bytes_remaining > 1024 * 1024) {
+                       archive_set_error(&a->archive, ENOMEM,
+                           "Rejecting malformed cpio archive: symlink contents exceed 1 megabyte");
+                       return (ARCHIVE_FATAL);
+               }
                h = __archive_read_ahead(a,
                        (size_t)cpio->entry_bytes_remaining, NULL);
                if (h == NULL)
index 6934cee..f41ba38 100644 (file)
@@ -1091,7 +1091,7 @@ choose_volume(struct archive_read *a, struct iso9660 *iso9660)
                /* This condition is unlikely; by way of caution. */
                vd = &(iso9660->joliet);
 
-       skipsize = LOGICAL_BLOCK_SIZE * vd->location;
+       skipsize = LOGICAL_BLOCK_SIZE * (int64_t)vd->location;
        skipsize = __archive_read_consume(a, skipsize);
        if (skipsize < 0)
                return ((int)skipsize);
@@ -1129,7 +1129,7 @@ choose_volume(struct archive_read *a, struct iso9660 *iso9660)
            && iso9660->seenJoliet) {
                /* Switch reading data from primary to joliet. */
                vd = &(iso9660->joliet);
-               skipsize = LOGICAL_BLOCK_SIZE * vd->location;
+               skipsize = LOGICAL_BLOCK_SIZE * (int64_t)vd->location;
                skipsize -= iso9660->current_position;
                skipsize = __archive_read_consume(a, skipsize);
                if (skipsize < 0)
index 81d9652..8c3be9a 100644 (file)
@@ -1342,7 +1342,7 @@ parse_line(struct archive_read *a, struct archive_entry *entry,
 /* strsep() is not in C90, but strcspn() is. */
 /* Taken from http://unixpapa.com/incnote/string.html */
 static char *
-la_strsep(char **sp, char *sep)
+la_strsep(char **sp, const char *sep)
 {
        char *p, *s;
        if (sp == NULL || *sp == NULL || **sp == '\0')
@@ -1385,12 +1385,12 @@ parse_device(dev_t *pdev, struct archive *a, char *val)
                                    "Missing number");
                                return ARCHIVE_WARN;
                        }
-                       numbers[argc++] = (unsigned long)mtree_atol(&p);
-                       if (argc > MAX_PACK_ARGS) {
+                       if (argc >= MAX_PACK_ARGS) {
                                archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT,
                                    "Too many arguments");
                                return ARCHIVE_WARN;
                        }
+                       numbers[argc++] = (unsigned long)mtree_atol(&p);
                }
                if (argc < 2) {
                        archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT,
index 6450aac..f729f17 100644 (file)
@@ -2127,6 +2127,12 @@ parse_codes(struct archive_read *a)
       rar->range_dec.Stream = &rar->bytein;
       __archive_ppmd7_functions.Ppmd7_Construct(&rar->ppmd7_context);
 
+      if (rar->dictionary_size == 0) {
+             archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+                          "Invalid zero dictionary size");
+             return (ARCHIVE_FATAL);
+      }
+
       if (!__archive_ppmd7_functions.Ppmd7_Alloc(&rar->ppmd7_context,
         rar->dictionary_size, &g_szalloc))
       {
@@ -2884,11 +2890,10 @@ copy_from_lzss_window(struct archive_read *a, const void **buffer,
   }
 
   windowoffs = lzss_offset_for_position(&rar->lzss, startpos);
-  if(windowoffs + length <= lzss_size(&rar->lzss))
+  if(windowoffs + length <= lzss_size(&rar->lzss)) {
     memcpy(&rar->unp_buffer[rar->unp_offset], &rar->lzss.window[windowoffs],
            length);
-  else
-  {
+  } else if (length <= lzss_size(&rar->lzss)) {
     firstpart = lzss_size(&rar->lzss) - windowoffs;
     if (firstpart < 0) {
       archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
@@ -2900,9 +2905,14 @@ copy_from_lzss_window(struct archive_read *a, const void **buffer,
              &rar->lzss.window[windowoffs], firstpart);
       memcpy(&rar->unp_buffer[rar->unp_offset + firstpart],
              &rar->lzss.window[0], length - firstpart);
-    } else
+    } else {
       memcpy(&rar->unp_buffer[rar->unp_offset],
              &rar->lzss.window[windowoffs], length);
+    }
+  } else {
+      archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+                        "Bad RAR file data");
+      return (ARCHIVE_FATAL);
   }
   rar->unp_offset += length;
   if (rar->unp_offset >= rar->unp_buffer_size)
index 01d85cf..b0521a6 100644 (file)
@@ -202,7 +202,7 @@ static int  archive_read_format_tar_read_header(struct archive_read *,
                    struct archive_entry *);
 static int     checksum(struct archive_read *, const void *);
 static int     pax_attribute(struct archive_read *, struct tar *,
-                   struct archive_entry *, char *key, char *value);
+                   struct archive_entry *, const char *key, const char *value);
 static int     pax_header(struct archive_read *, struct tar *,
                    struct archive_entry *, char *attr);
 static void    pax_time(const char *, int64_t *sec, long *nanos);
@@ -1664,7 +1664,7 @@ pax_header(struct archive_read *a, struct tar *tar,
 
 static int
 pax_attribute_xattr(struct archive_entry *entry,
-       char *name, char *value)
+       const char *name, const char *value)
 {
        char *name_decoded;
        void *value_decoded;
@@ -1710,7 +1710,7 @@ pax_attribute_xattr(struct archive_entry *entry,
  */
 static int
 pax_attribute(struct archive_read *a, struct tar *tar,
-    struct archive_entry *entry, char *key, char *value)
+    struct archive_entry *entry, const char *key, const char *value)
 {
        int64_t s;
        long n;
index 0a0be96..34ab04e 100644 (file)
@@ -181,6 +181,14 @@ struct zip {
        char                    init_decryption;
 
        /* Decryption buffer. */
+       /*
+        * The decrypted data starts at decrypted_ptr and
+        * extends for decrypted_bytes_remaining.  Decryption
+        * adds new data to the end of this block, data is returned
+        * to clients from the beginning.  When the block hits the
+        * end of decrypted_buffer, it has to be shuffled back to
+        * the beginning of the buffer.
+        */
        unsigned char           *decrypted_buffer;
        unsigned char           *decrypted_ptr;
        size_t                  decrypted_buffer_size;
@@ -1293,8 +1301,9 @@ zip_read_data_deflate(struct archive_read *a, const void **buff,
 
        if (zip->tctx_valid || zip->cctx_valid) {
                if (zip->decrypted_bytes_remaining < (size_t)bytes_avail) {
-                       size_t buff_remaining = zip->decrypted_buffer_size
-                           - (zip->decrypted_ptr - zip->decrypted_buffer);
+                       size_t buff_remaining =
+                           (zip->decrypted_buffer + zip->decrypted_buffer_size)
+                           - (zip->decrypted_ptr + zip->decrypted_bytes_remaining);
 
                        if (buff_remaining > (size_t)bytes_avail)
                                buff_remaining = (size_t)bytes_avail;
index 800aa89..da76c54 100644 (file)
@@ -468,9 +468,17 @@ permissive_name_w(struct archive_write_disk *a)
                return (-1);
        archive_wstring_ensure(&(a->_name_data), 4 + l + 1 + wcslen(wn) + 1);
        a->name = a->_name_data.s;
-       /* Prepend "\\?\" and drive name. */
-       archive_wstrncpy(&(a->_name_data), L"\\\\?\\", 4);
-       archive_wstrncat(&(a->_name_data), wsp, l);
+       /* Prepend "\\?\" and drive name if not already added. */
+       if (l > 3 && wsp[0] == L'\\' && wsp[1] == L'\\' &&
+               wsp[2] == L'?' && wsp[3] == L'\\')
+       {
+               archive_wstrncpy(&(a->_name_data), wsp, l);
+       }
+       else
+       {
+               archive_wstrncpy(&(a->_name_data), L"\\\\?\\", 4);
+               archive_wstrncat(&(a->_name_data), wsp, l);
+       }
        archive_wstrncat(&(a->_name_data), L"\\", 1);
        archive_wstrcat(&(a->_name_data), wn);
        a->name = a->_name_data.s;
index 869dc46..e1d1891 100644 (file)
@@ -43,6 +43,7 @@
 .Nm archive_write_add_filter_program ,
 .Nm archive_write_add_filter_uuencode ,
 .Nm archive_write_add_filter_xz
+.Nd functions enabling output filters
 .Sh LIBRARY
 Streaming Archive Library (libarchive, -larchive)
 .Sh SYNOPSIS
index 647079d..1d635d2 100644 (file)
@@ -467,7 +467,7 @@ archive_write_gnutar_header(struct archive_write *a,
                }
        }
        if (gnutar->linkname_length > GNUTAR_linkname_size) {
-               size_t todo = gnutar->linkname_length;
+               size_t length = gnutar->linkname_length + 1;
                struct archive_entry *temp = archive_entry_new2(&a->archive);
 
                /* Uname/gname here don't really matter since no one reads them;
@@ -476,7 +476,7 @@ archive_write_gnutar_header(struct archive_write *a,
                archive_entry_set_gname(temp, "wheel");
 
                archive_entry_set_pathname(temp, "././@LongLink");
-               archive_entry_set_size(temp, gnutar->linkname_length + 1);
+               archive_entry_set_size(temp, length);
                ret = archive_format_gnutar_header(a, buff, temp, 'K');
                if (ret < ARCHIVE_WARN)
                        goto exit_write_header;
@@ -484,11 +484,12 @@ archive_write_gnutar_header(struct archive_write *a,
                if(ret < ARCHIVE_WARN)
                        goto exit_write_header;
                archive_entry_free(temp);
-               /* Write as many 512 bytes blocks as needed to write full name. */
-               ret = __archive_write_output(a, gnutar->linkname, todo);
+               /* Write name and trailing null byte. */
+               ret = __archive_write_output(a, gnutar->linkname, length);
                if(ret < ARCHIVE_WARN)
                        goto exit_write_header;
-               ret = __archive_write_nulls(a, 0x1ff & (-(ssize_t)todo));
+               /* Pad to 512 bytes */
+               ret = __archive_write_nulls(a, 0x1ff & (-(ssize_t)length));
                if (ret < ARCHIVE_WARN)
                        goto exit_write_header;
        }
@@ -496,7 +497,7 @@ archive_write_gnutar_header(struct archive_write *a,
        /* If pathname is longer than 100 chars we need to add an 'L' header. */
        if (gnutar->pathname_length > GNUTAR_name_size) {
                const char *pathname = gnutar->pathname;
-               size_t todo = gnutar->pathname_length;
+               size_t length = gnutar->pathname_length + 1;
                struct archive_entry *temp = archive_entry_new2(&a->archive);
 
                /* Uname/gname here don't really matter since no one reads them;
@@ -505,7 +506,7 @@ archive_write_gnutar_header(struct archive_write *a,
                archive_entry_set_gname(temp, "wheel");
 
                archive_entry_set_pathname(temp, "././@LongLink");
-               archive_entry_set_size(temp, gnutar->pathname_length + 1);
+               archive_entry_set_size(temp, length);
                ret = archive_format_gnutar_header(a, buff, temp, 'L');
                if (ret < ARCHIVE_WARN)
                        goto exit_write_header;
@@ -513,11 +514,12 @@ archive_write_gnutar_header(struct archive_write *a,
                if(ret < ARCHIVE_WARN)
                        goto exit_write_header;
                archive_entry_free(temp);
-               /* Write as many 512 bytes blocks as needed to write full name. */
-               ret = __archive_write_output(a, pathname, todo);
+               /* Write pathname + trailing null byte. */
+               ret = __archive_write_output(a, pathname, length);
                if(ret < ARCHIVE_WARN)
                        goto exit_write_header;
-               ret = __archive_write_nulls(a, 0x1ff & (-(ssize_t)todo));
+               /* Pad to multiple of 512 bytes. */
+               ret = __archive_write_nulls(a, 0x1ff & (-(ssize_t)length));
                if (ret < ARCHIVE_WARN)
                        goto exit_write_header;
        }
index 4d832fb..cb3e54e 100644 (file)
@@ -6225,7 +6225,7 @@ isoent_gen_joliet_identifier(struct archive_write *a, struct isoent *isoent,
        unsigned char *p;
        size_t l;
        int r;
-       int ffmax, parent_len;
+       size_t ffmax, parent_len;
        static const struct archive_rb_tree_ops rb_ops = {
                isoent_cmp_node_joliet, isoent_cmp_key_joliet
        };
@@ -6239,7 +6239,7 @@ isoent_gen_joliet_identifier(struct archive_write *a, struct isoent *isoent,
        else
                ffmax = 128;
 
-       r = idr_start(a, idr, isoent->children.cnt, ffmax, 6, 2, &rb_ops);
+       r = idr_start(a, idr, isoent->children.cnt, (int)ffmax, 6, 2, &rb_ops);
        if (r < 0)
                return (r);
 
@@ -6252,7 +6252,7 @@ isoent_gen_joliet_identifier(struct archive_write *a, struct isoent *isoent,
                int ext_off, noff, weight;
                size_t lt;
 
-               if ((int)(l = np->file->basename_utf16.length) > ffmax)
+               if ((l = np->file->basename_utf16.length) > ffmax)
                        l = ffmax;
 
                p = malloc((l+1)*2);
@@ -6285,7 +6285,7 @@ isoent_gen_joliet_identifier(struct archive_write *a, struct isoent *isoent,
                /*
                 * Get a length of MBS of a full-pathname.
                 */
-               if ((int)np->file->basename_utf16.length > ffmax) {
+               if (np->file->basename_utf16.length > ffmax) {
                        if (archive_strncpy_l(&iso9660->mbs,
                            (const char *)np->identifier, l,
                                iso9660->sconv_from_utf16be) != 0 &&
@@ -6302,7 +6302,9 @@ isoent_gen_joliet_identifier(struct archive_write *a, struct isoent *isoent,
 
                /* If a length of full-pathname is longer than 240 bytes,
                 * it violates Joliet extensions regulation. */
-               if (parent_len + np->mb_len > 240) {
+               if (parent_len > 240
+                   || np->mb_len > 240
+                   || parent_len + np->mb_len > 240) {
                        archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
                            "The regulation of Joliet extensions;"
                            " A length of a full-pathname of `%s' is "
@@ -6314,11 +6316,11 @@ isoent_gen_joliet_identifier(struct archive_write *a, struct isoent *isoent,
 
                /* Make an offset of the number which is used to be set
                 * hexadecimal number to avoid duplicate identifier. */
-               if ((int)l == ffmax)
+               if (l == ffmax)
                        noff = ext_off - 6;
-               else if ((int)l == ffmax-2)
+               else if (l == ffmax-2)
                        noff = ext_off - 4;
-               else if ((int)l == ffmax-4)
+               else if (l == ffmax-4)
                        noff = ext_off - 2;
                else
                        noff = ext_off;
index ce7ed89..aeb7a18 100644 (file)
@@ -32,7 +32,7 @@
 .Nm archive_write_set_format_option ,
 .Nm archive_write_set_option ,
 .Nm archive_write_set_options
-.Nd functions controlling options for reading archives
+.Nd functions controlling options for writing archives
 .Sh LIBRARY
 Streaming Archive Library (libarchive, -larchive)
 .Sh SYNOPSIS
index e619fe5..9cec760 100644 (file)
@@ -65,7 +65,6 @@ Later variants have extended this by either appropriating undefined
 areas of the header record, extending the header to multiple records,
 or by storing special entries that modify the interpretation of
 subsequent entries.
-.Pp
 .Bl -tag -width indent
 .It Cm gnutar
 The
index bacd6e1..881a67c 100644 (file)
@@ -28,7 +28,7 @@
 .Dt LIBARCHIVE_CHANGES 3
 .Os
 .Sh NAME
-.Nm changes in libarchive interface
+.Nd changes in libarchive interface
 .\"
 .Sh CHANGES IN LIBARCHIVE 3
 This page describes user-visible changes in libarchive3, and lists
index ae5a1aa..124aa3a 100644 (file)
@@ -143,6 +143,7 @@ IF(ENABLE_TEST)
     test_read_format_rar_encryption_data.c
     test_read_format_rar_encryption_header.c
     test_read_format_rar_encryption_partially.c
+    test_read_format_rar_invalid1.c
     test_read_format_raw.c
     test_read_format_tar.c
     test_read_format_tar_concatenated.c
@@ -222,6 +223,7 @@ IF(ENABLE_TEST)
     test_write_format_cpio_newc.c
     test_write_format_cpio_odc.c
     test_write_format_gnutar.c
+    test_write_format_gnutar_filenames.c
     test_write_format_iso9660.c
     test_write_format_iso9660_boot.c
     test_write_format_iso9660_empty.c
index ad5f616..89b22c6 100644 (file)
@@ -283,6 +283,7 @@ DEFINE_TEST(test_read_format_rar_multivolume_uncompressed_files)
 DEFINE_TEST(test_read_format_rar_encryption_data)
 DEFINE_TEST(test_read_format_rar_encryption_header)
 DEFINE_TEST(test_read_format_rar_encryption_partially)
+DEFINE_TEST(test_read_format_rar_invalid1)
 DEFINE_TEST(test_read_format_raw)
 DEFINE_TEST(test_read_format_tar)
 DEFINE_TEST(test_read_format_tar_concatenated)
@@ -422,6 +423,8 @@ DEFINE_TEST(test_write_format_cpio_empty)
 DEFINE_TEST(test_write_format_cpio_newc)
 DEFINE_TEST(test_write_format_cpio_odc)
 DEFINE_TEST(test_write_format_gnutar)
+DEFINE_TEST(test_write_format_gnutar_filenames)
+DEFINE_TEST(test_write_format_gnutar_linknames)
 DEFINE_TEST(test_write_format_iso9660_boot)
 DEFINE_TEST(test_write_format_iso9660)
 DEFINE_TEST(test_write_format_iso9660_empty)
index e0af431..0f50e94 100644 (file)
@@ -2533,18 +2533,36 @@ usage(const char *program)
 static char *
 get_refdir(const char *d)
 {
-       char tried[512] = { '\0' };
-       char buff[128];
-       char *pwd, *p;
+       size_t tried_size, buff_size;
+       char *buff, *tried, *pwd = NULL, *p = NULL;
+
+#ifdef PATH_MAX
+       buff_size = PATH_MAX;
+#else
+       buff_size = 8192;
+#endif
+       buff = calloc(buff_size, 1);
+       if (buff == NULL) {
+               fprintf(stderr, "Unable to allocate memory\n");
+               exit(1);
+       }
+
+       /* Allocate a buffer to hold the various directories we checked. */
+       tried_size = buff_size * 2;
+       tried = calloc(tried_size, 1);
+       if (tried == NULL) {
+               fprintf(stderr, "Unable to allocate memory\n");
+               exit(1);
+       }
 
        /* If a dir was specified, try that */
        if (d != NULL) {
                pwd = NULL;
-               snprintf(buff, sizeof(buff), "%s", d);
+               snprintf(buff, buff_size, "%s", d);
                p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
                if (p != NULL) goto success;
-               strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-               strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+               strncat(tried, buff, tried_size - strlen(tried) - 1);
+               strncat(tried, "\n", tried_size - strlen(tried) - 1);
                goto failure;
        }
 
@@ -2558,48 +2576,48 @@ get_refdir(const char *d)
                pwd[strlen(pwd) - 1] = '\0';
 
        /* Look for a known file. */
-       snprintf(buff, sizeof(buff), "%s", pwd);
+       snprintf(buff, buff_size, "%s", pwd);
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
-       snprintf(buff, sizeof(buff), "%s/test", pwd);
+       snprintf(buff, buff_size, "%s/test", pwd);
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
 #if defined(LIBRARY)
-       snprintf(buff, sizeof(buff), "%s/%s/test", pwd, LIBRARY);
+       snprintf(buff, buff_size, "%s/%s/test", pwd, LIBRARY);
 #else
-       snprintf(buff, sizeof(buff), "%s/%s/test", pwd, PROGRAM);
+       snprintf(buff, buff_size, "%s/%s/test", pwd, PROGRAM);
 #endif
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
 #if defined(PROGRAM_ALIAS)
-       snprintf(buff, sizeof(buff), "%s/%s/test", pwd, PROGRAM_ALIAS);
+       snprintf(buff, buff_size, "%s/%s/test", pwd, PROGRAM_ALIAS);
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 #endif
 
        if (memcmp(pwd, "/usr/obj", 8) == 0) {
-               snprintf(buff, sizeof(buff), "%s", pwd + 8);
+               snprintf(buff, buff_size, "%s", pwd + 8);
                p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
                if (p != NULL) goto success;
-               strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-               strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+               strncat(tried, buff, tried_size - strlen(tried) - 1);
+               strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
-               snprintf(buff, sizeof(buff), "%s/test", pwd + 8);
+               snprintf(buff, buff_size, "%s/test", pwd + 8);
                p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
                if (p != NULL) goto success;
-               strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-               strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+               strncat(tried, buff, tried_size - strlen(tried) - 1);
+               strncat(tried, "\n", tried_size - strlen(tried) - 1);
        }
 
 failure:
@@ -2614,7 +2632,12 @@ failure:
 success:
        free(p);
        free(pwd);
-       return strdup(buff);
+       free(tried);
+
+       /* Copy result into a fresh buffer to reduce memory usage. */
+       p = strdup(buff);
+       free(buff);
+       return p;
 }
 
 int
diff --git a/libarchive/test/test_read_format_rar_invalid1.c b/libarchive/test/test_read_format_rar_invalid1.c
new file mode 100644 (file)
index 0000000..61dea16
--- /dev/null
@@ -0,0 +1,44 @@
+/*-
+ * Copyright (c) 2003-2016 Tim Kientzle
+ * 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.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+DEFINE_TEST(test_read_format_rar_invalid1)
+{
+       const char *refname = "test_read_format_rar_invalid1.rar";
+       struct archive *a;
+       struct archive_entry *ae;
+       char *buff[100];
+
+       extract_reference_file(refname);
+       assert((a = archive_read_new()) != NULL);
+       assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
+       assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
+       assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, refname, 10240));
+       assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+       assertEqualIntA(a, ARCHIVE_FATAL, archive_read_data(a, buff, 99));
+       assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+       assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+}
diff --git a/libarchive/test/test_read_format_rar_invalid1.rar.uu b/libarchive/test/test_read_format_rar_invalid1.rar.uu
new file mode 100644 (file)
index 0000000..2380399
--- /dev/null
@@ -0,0 +1,5 @@
+begin 644 test_read_format_rar_invalid1.rar
+M4F%R(1H'`,^0<P``#0````````"9SG0@D"8`#`````,````#+7,'\(^>B$4=
+2,P0`I($``'1E<W0`P/\````)
+`
+end
diff --git a/libarchive/test/test_write_format_gnutar_filenames.c b/libarchive/test/test_write_format_gnutar_filenames.c
new file mode 100644 (file)
index 0000000..38b4ca9
--- /dev/null
@@ -0,0 +1,145 @@
+/*-
+ * Copyright (c) 2016 Tim Kientzle
+ * 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.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+/*
+ * Inspired by Github issue #682, which reported that gnutar filenames
+ * of exactly 512 bytes weren't getting written correctly.
+ *
+ * This writes a filename of every length from 1 to 2000 bytes and
+ * reads back to verify it.
+ */
+
+static char filename[2048];
+
+DEFINE_TEST(test_write_format_gnutar_filenames)
+{
+       size_t buffsize = 1000000;
+       char *buff;
+       struct archive_entry *ae, *template;
+       struct archive *a;
+       size_t used;
+
+       buff = malloc(buffsize); /* million bytes of work area */
+       assert(buff != NULL);
+
+       /* Create a template entry. */
+       assert((template = archive_entry_new()) != NULL);
+       archive_entry_set_atime(template, 2, 20);
+       archive_entry_set_birthtime(template, 3, 30);
+       archive_entry_set_ctime(template, 4, 40);
+       archive_entry_set_mtime(template, 5, 50);
+       archive_entry_set_mode(template, S_IFREG | 0755);
+       archive_entry_set_size(template, 8);
+
+       for (int i = 0; i < 2000; ++i) {
+               filename[i] = 'a';
+               filename[i + 1] = '\0';
+               archive_entry_copy_pathname(template, filename);
+
+               /* Write a one-item gnutar format archive. */
+               assert((a = archive_write_new()) != NULL);
+               assertA(0 == archive_write_set_format_gnutar(a));
+               assertA(0 == archive_write_add_filter_none(a));
+               assertA(0 == archive_write_open_memory(a, buff, buffsize, &used));
+               assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, template));
+               assertEqualIntA(a, 8, archive_write_data(a, "12345678", 9));
+               assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
+               assertEqualIntA(a, ARCHIVE_OK, archive_write_free(a));
+
+
+               /* Read back and verify the filename. */
+               assert((a = archive_read_new()) != NULL);
+               assertEqualIntA(a, 0, archive_read_support_format_all(a));
+               assertEqualIntA(a, 0, archive_read_support_filter_all(a));
+               assertEqualIntA(a, 0, archive_read_open_memory(a, buff, used));
+               
+               assertEqualIntA(a, 0, archive_read_next_header(a, &ae));
+               assertEqualString(filename, archive_entry_pathname(ae));
+               assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
+               assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+               assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a));
+       }
+
+       archive_entry_free(template);
+
+       free(buff);
+}
+
+
+DEFINE_TEST(test_write_format_gnutar_linknames)
+{
+       size_t buffsize = 1000000;
+       char *buff;
+       struct archive_entry *ae, *template;
+       struct archive *a;
+       size_t used;
+
+       buff = malloc(buffsize); /* million bytes of work area */
+       assert(buff != NULL);
+
+       /* Create a template entry. */
+       assert((template = archive_entry_new()) != NULL);
+       archive_entry_set_atime(template, 2, 20);
+       archive_entry_set_birthtime(template, 3, 30);
+       archive_entry_set_ctime(template, 4, 40);
+       archive_entry_set_mtime(template, 5, 50);
+       archive_entry_set_mode(template, S_IFLNK | 0755);
+       archive_entry_copy_pathname(template, "link");
+
+       for (int i = 0; i < 2000; ++i) {
+               filename[i] = 'a';
+               filename[i + 1] = '\0';
+               archive_entry_copy_symlink(template, filename);
+
+               /* Write a one-item gnutar format archive. */
+               assert((a = archive_write_new()) != NULL);
+               assertA(0 == archive_write_set_format_gnutar(a));
+               assertA(0 == archive_write_add_filter_none(a));
+               assertA(0 == archive_write_open_memory(a, buff, buffsize, &used));
+               assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, template));
+               assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
+               assertEqualIntA(a, ARCHIVE_OK, archive_write_free(a));
+
+
+               /* Read back and verify the filename. */
+               assert((a = archive_read_new()) != NULL);
+               assertEqualIntA(a, 0, archive_read_support_format_all(a));
+               assertEqualIntA(a, 0, archive_read_support_filter_all(a));
+               assertEqualIntA(a, 0, archive_read_open_memory(a, buff, used));
+               
+               assertEqualIntA(a, 0, archive_read_next_header(a, &ae));
+               assertEqualString("link", archive_entry_pathname(ae));
+               assertEqualString(filename, archive_entry_symlink(ae));
+               assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
+               assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+               assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a));
+       }
+
+       archive_entry_free(template);
+
+       free(buff);
+}
index 7a55fc8..d7f8e96 100644 (file)
@@ -57,7 +57,7 @@ You can contact the author at :
 ** #define XXH_ACCEPT_NULL_INPUT_POINTER 1
 
 ** XXH_FORCE_NATIVE_FORMAT :
-** By default, xxHash library provides endian-independant Hash values, based on little-endian convention.
+** By default, xxHash library provides endian-independent Hash values, based on little-endian convention.
 ** Results are therefore identical for little-endian and big-endian CPU.
 ** This comes at a performance cost for big-endian CPU, since some swapping is required to emulate little-endian format.
 ** Should endian-independance be of no importance for your application, you may set the #define below to 1.
index 8618a94..8c86035 100644 (file)
@@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
 
 static void lafe_vwarnc(int, const char *, va_list) __LA_PRINTFLIKE(2, 0);
 
-const char *lafe_progname;
+static const char *lafe_progname;
 
 const char *
 lafe_getprogname(void)
index 9648e48..f19a5f6 100644 (file)
@@ -25,6 +25,7 @@ IF(ENABLE_TAR AND ENABLE_TEST)
     test_format_newc.c
     test_help.c
     test_leading_slash.c
+    test_missing_file.c
     test_option_C_upper.c
     test_option_H_upper.c
     test_option_L_upper.c
index 03616af..7021408 100644 (file)
@@ -15,6 +15,7 @@ DEFINE_TEST(test_extract_tar_Z)
 DEFINE_TEST(test_format_newc)
 DEFINE_TEST(test_help)
 DEFINE_TEST(test_leading_slash)
+DEFINE_TEST(test_missing_file)
 DEFINE_TEST(test_option_a)
 DEFINE_TEST(test_option_b64encode)
 DEFINE_TEST(test_option_b)
index 90801a9..08ac627 100644 (file)
@@ -2535,18 +2535,36 @@ usage(const char *program)
 static char *
 get_refdir(const char *d)
 {
-       char tried[512] = { '\0' };
-       char buff[128];
-       char *pwd, *p;
+       size_t tried_size, buff_size;
+       char *buff, *tried, *pwd = NULL, *p = NULL;
+
+#ifdef PATH_MAX
+       buff_size = PATH_MAX;
+#else
+       buff_size = 8192;
+#endif
+       buff = calloc(buff_size, 1);
+       if (buff == NULL) {
+               fprintf(stderr, "Unable to allocate memory\n");
+               exit(1);
+       }
+
+       /* Allocate a buffer to hold the various directories we checked. */
+       tried_size = buff_size * 2;
+       tried = calloc(tried_size, 1);
+       if (tried == NULL) {
+               fprintf(stderr, "Unable to allocate memory\n");
+               exit(1);
+       }
 
        /* If a dir was specified, try that */
        if (d != NULL) {
                pwd = NULL;
-               snprintf(buff, sizeof(buff), "%s", d);
+               snprintf(buff, buff_size, "%s", d);
                p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
                if (p != NULL) goto success;
-               strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-               strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+               strncat(tried, buff, tried_size - strlen(tried) - 1);
+               strncat(tried, "\n", tried_size - strlen(tried) - 1);
                goto failure;
        }
 
@@ -2560,48 +2578,48 @@ get_refdir(const char *d)
                pwd[strlen(pwd) - 1] = '\0';
 
        /* Look for a known file. */
-       snprintf(buff, sizeof(buff), "%s", pwd);
+       snprintf(buff, buff_size, "%s", pwd);
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
-       snprintf(buff, sizeof(buff), "%s/test", pwd);
+       snprintf(buff, buff_size, "%s/test", pwd);
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
 #if defined(LIBRARY)
-       snprintf(buff, sizeof(buff), "%s/%s/test", pwd, LIBRARY);
+       snprintf(buff, buff_size, "%s/%s/test", pwd, LIBRARY);
 #else
-       snprintf(buff, sizeof(buff), "%s/%s/test", pwd, PROGRAM);
+       snprintf(buff, buff_size, "%s/%s/test", pwd, PROGRAM);
 #endif
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
 #if defined(PROGRAM_ALIAS)
-       snprintf(buff, sizeof(buff), "%s/%s/test", pwd, PROGRAM_ALIAS);
+       snprintf(buff, buff_size, "%s/%s/test", pwd, PROGRAM_ALIAS);
        p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
        if (p != NULL) goto success;
-       strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-       strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+       strncat(tried, buff, tried_size - strlen(tried) - 1);
+       strncat(tried, "\n", tried_size - strlen(tried) - 1);
 #endif
 
        if (memcmp(pwd, "/usr/obj", 8) == 0) {
-               snprintf(buff, sizeof(buff), "%s", pwd + 8);
+               snprintf(buff, buff_size, "%s", pwd + 8);
                p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
                if (p != NULL) goto success;
-               strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-               strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+               strncat(tried, buff, tried_size - strlen(tried) - 1);
+               strncat(tried, "\n", tried_size - strlen(tried) - 1);
 
-               snprintf(buff, sizeof(buff), "%s/test", pwd + 8);
+               snprintf(buff, buff_size, "%s/test", pwd + 8);
                p = slurpfile(NULL, "%s/%s", buff, KNOWNREF);
                if (p != NULL) goto success;
-               strncat(tried, buff, sizeof(tried) - strlen(tried) - 1);
-               strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
+               strncat(tried, buff, tried_size - strlen(tried) - 1);
+               strncat(tried, "\n", tried_size - strlen(tried) - 1);
        }
 
 failure:
@@ -2616,7 +2634,12 @@ failure:
 success:
        free(p);
        free(pwd);
-       return strdup(buff);
+       free(tried);
+
+       /* Copy result into a fresh buffer to reduce memory usage. */
+       p = strdup(buff);
+       free(buff);
+       return p;
 }
 
 int
diff --git a/tar/test/test_missing_file.c b/tar/test/test_missing_file.c
new file mode 100644 (file)
index 0000000..e2e5da5
--- /dev/null
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2016 Tim Kientzle
+ * 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.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+DEFINE_TEST(test_missing_file)
+{
+       assertMakeFile("file1", 0644, "file1");
+       assertMakeFile("file2", 0644, "file2");
+       assert(0 == systemf("%s -cf archive.tar file1 file2 2>stderr1", testprog));
+       assertEmptyFile("stderr1");
+       assert(0 != systemf("%s -cf archive.tar file1 file2 file3 2>stderr2", testprog));
+       assert(0 != systemf("%s -cf archive.tar 2>stderr3", testprog));
+       assert(0 != systemf("%s -cf archive.tar file3 2>stderr4", testprog));
+}
index 53b6383..2d076f4 100644 (file)
@@ -884,7 +884,7 @@ write_hierarchy(struct bsdtar *bsdtar, struct archive *a, const char *path)
                else if (r != ARCHIVE_OK) {
                        lafe_warnc(archive_errno(disk),
                            "%s", archive_error_string(disk));
-                       if (r == ARCHIVE_FATAL) {
+                       if (r == ARCHIVE_FATAL || r == ARCHIVE_FAILED) {
                                bsdtar->return_value = 1;
                                return;
                        } else if (r < ARCHIVE_WARN)