Author: mm
Date: Wed Sep 19 10:26:45 2018
New Revision: 338797
URL: https://svnweb.freebsd.org/changeset/base/338797

Log:
  Update vendor/libarchive/dist to git 0cda60af13e709e670af90553b2271bf194e7ccd
  
  Relevant vendor changes:
    PR #1019: Add allocation check for the zip_entry struct
    Oss-Fuzz #10192: Handle whitespace-only ACL fields correctly

Modified:
  vendor/libarchive/dist/CMakeLists.txt
  vendor/libarchive/dist/README.md
  vendor/libarchive/dist/build/version
  vendor/libarchive/dist/configure.ac
  vendor/libarchive/dist/contrib/android/Android.mk
  vendor/libarchive/dist/libarchive/archive.h
  vendor/libarchive/dist/libarchive/archive_acl.c
  vendor/libarchive/dist/libarchive/archive_cryptor.c
  vendor/libarchive/dist/libarchive/archive_entry.h
  vendor/libarchive/dist/libarchive/archive_read_support_format_ar.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c
  vendor/libarchive/dist/libarchive/test/test_sparse_basic.c
  vendor/libarchive/dist/test_utils/test_main.c

Modified: vendor/libarchive/dist/CMakeLists.txt
==============================================================================
--- vendor/libarchive/dist/CMakeLists.txt       Wed Sep 19 09:41:44 2018        
(r338796)
+++ vendor/libarchive/dist/CMakeLists.txt       Wed Sep 19 10:26:45 2018        
(r338797)
@@ -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".

Modified: vendor/libarchive/dist/README.md
==============================================================================
--- vendor/libarchive/dist/README.md    Wed Sep 19 09:41:44 2018        
(r338796)
+++ vendor/libarchive/dist/README.md    Wed Sep 19 10:26:45 2018        
(r338797)
@@ -78,7 +78,6 @@ Currently, the library automatically detects and reads
   * POSIX pax interchange format
   * POSIX octet-oriented cpio
   * SVR4 ASCII cpio
-  * POSIX octet-oriented cpio
   * Binary cpio (big-endian or little-endian)
   * ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions)
   * ZIP archives (with uncompressed or "deflate" compressed entries, including 
support for encrypted Zip archives)

Modified: vendor/libarchive/dist/build/version
==============================================================================
--- vendor/libarchive/dist/build/version        Wed Sep 19 09:41:44 2018        
(r338796)
+++ vendor/libarchive/dist/build/version        Wed Sep 19 10:26:45 2018        
(r338797)
@@ -1 +1 @@
-3003003
+3003004dev

Modified: vendor/libarchive/dist/configure.ac
==============================================================================
--- vendor/libarchive/dist/configure.ac Wed Sep 19 09:41:44 2018        
(r338796)
+++ vendor/libarchive/dist/configure.ac Wed Sep 19 10:26:45 2018        
(r338797)
@@ -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.3.3])
-m4_define([LIBARCHIVE_VERSION_N],[3003003])
+m4_define([LIBARCHIVE_VERSION_S],[3.3.4dev])
+m4_define([LIBARCHIVE_VERSION_N],[3003004])
 
 dnl bsdtar and bsdcpio versioning tracks libarchive
 m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S())
@@ -1153,12 +1153,7 @@ if test "x$with_openssl" != "xno"; then
     CRYPTO_CHECK(SHA256, OPENSSL, sha256)
     CRYPTO_CHECK(SHA384, OPENSSL, sha384)
     CRYPTO_CHECK(SHA512, OPENSSL, sha512)
-    if test "x$found_OPENSSL" != "xyes"; then
-      LIBS=$saved_LIBS
-    else
-      AC_CHECK_FUNCS([PKCS5_PBKDF2_HMAC_SHA1])
-    fi
-    AC_CHECK_LIB(crypto,EVP_CIPHER_CTX_init)
+    AC_CHECK_FUNCS([PKCS5_PBKDF2_HMAC_SHA1])
 fi
 
 # Probe libmd AFTER OpenSSL/libcrypto.

Modified: vendor/libarchive/dist/contrib/android/Android.mk
==============================================================================
--- vendor/libarchive/dist/contrib/android/Android.mk   Wed Sep 19 09:41:44 
2018        (r338796)
+++ vendor/libarchive/dist/contrib/android/Android.mk   Wed Sep 19 10:26:45 
2018        (r338797)
@@ -94,9 +94,9 @@ libarchive_src_files := libarchive/archive_acl.c \
                                                libarchive/archive_string.c \
                                                
libarchive/archive_string_sprintf.c \
                                                libarchive/archive_util.c \
+                                               
libarchive/archive_version_details.c \
                                                libarchive/archive_virtual.c \
                                                libarchive/archive_write.c \
-                                               
libarchive/archive_write_disk_acl.c \
                                                
libarchive/archive_write_disk_posix.c \
                                                
libarchive/archive_write_disk_set_standard_lookup.c \
                                                
libarchive/archive_write_open_fd.c \

Modified: vendor/libarchive/dist/libarchive/archive.h
==============================================================================
--- vendor/libarchive/dist/libarchive/archive.h Wed Sep 19 09:41:44 2018        
(r338796)
+++ vendor/libarchive/dist/libarchive/archive.h Wed Sep 19 10:26:45 2018        
(r338797)
@@ -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 3003003
+#define        ARCHIVE_VERSION_NUMBER 3003004
 
 #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.3.3"
+#define        ARCHIVE_VERSION_ONLY_STRING "3.3.4dev"
 #define        ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
 __LA_DECL const char * archive_version_string(void);
 

Modified: vendor/libarchive/dist/libarchive/archive_acl.c
==============================================================================
--- vendor/libarchive/dist/libarchive/archive_acl.c     Wed Sep 19 09:41:44 
2018        (r338796)
+++ vendor/libarchive/dist/libarchive/archive_acl.c     Wed Sep 19 10:26:45 
2018        (r338797)
@@ -2058,6 +2058,12 @@ next_field(const char **p, const char **start,
        }
        *sep = **p;
 
+       /* If the field is only whitespace, bail out now. */
+       if (**p == '\0') {
+               *end = *p;
+               return;
+       }
+
        /* Trim trailing whitespace to locate end of field. */
        *end = *p - 1;
        while (**end == ' ' || **end == '\t' || **end == '\n') {

Modified: vendor/libarchive/dist/libarchive/archive_cryptor.c
==============================================================================
--- vendor/libarchive/dist/libarchive/archive_cryptor.c Wed Sep 19 09:41:44 
2018        (r338796)
+++ vendor/libarchive/dist/libarchive/archive_cryptor.c Wed Sep 19 10:26:45 
2018        (r338797)
@@ -316,7 +316,14 @@ aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *k
        memcpy(ctx->key, key, key_len);
        memset(ctx->nonce, 0, sizeof(ctx->nonce));
        ctx->encr_pos = AES_BLOCK_SIZE;
+#if OPENSSL_VERSION_NUMBER  >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+       if (!EVP_CIPHER_CTX_reset(ctx->ctx)) {
+               EVP_CIPHER_CTX_free(ctx->ctx);
+               ctx->ctx = NULL;
+       }
+#else
        EVP_CIPHER_CTX_init(ctx->ctx);
+#endif
        return 0;
 }
 

Modified: vendor/libarchive/dist/libarchive/archive_entry.h
==============================================================================
--- vendor/libarchive/dist/libarchive/archive_entry.h   Wed Sep 19 09:41:44 
2018        (r338796)
+++ vendor/libarchive/dist/libarchive/archive_entry.h   Wed Sep 19 10:26:45 
2018        (r338797)
@@ -30,7 +30,7 @@
 #define        ARCHIVE_ENTRY_H_INCLUDED
 
 /* Note: Compiler will complain if this does not match archive.h! */
-#define        ARCHIVE_VERSION_NUMBER 3003003
+#define        ARCHIVE_VERSION_NUMBER 3003004
 
 /*
  * Note: archive_entry.h is for use outside of libarchive; the

Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_ar.c
==============================================================================
--- vendor/libarchive/dist/libarchive/archive_read_support_format_ar.c  Wed Sep 
19 09:41:44 2018        (r338796)
+++ vendor/libarchive/dist/libarchive/archive_read_support_format_ar.c  Wed Sep 
19 10:26:45 2018        (r338797)
@@ -459,6 +459,7 @@ ar_parse_common_header(struct ar *ar, struct archive_e
        uint64_t n;
 
        /* Copy remaining header */
+       archive_entry_set_filetype(entry, AE_IFREG);
        archive_entry_set_mtime(entry,
            (time_t)ar_atol10(h + AR_date_offset, AR_date_size), 0L);
        archive_entry_set_uid(entry,

Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c
==============================================================================
--- vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c Wed Sep 
19 09:41:44 2018        (r338796)
+++ vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c Wed Sep 
19 10:26:45 2018        (r338797)
@@ -2708,6 +2708,11 @@ slurp_central_directory(struct archive_read *a, struct
                        return ARCHIVE_FATAL;
 
                zip_entry = calloc(1, sizeof(struct zip_entry));
+               if (zip_entry == NULL) {
+                       archive_set_error(&a->archive, ENOMEM,
+                               "Can't allocate zip entry");
+                       return ARCHIVE_FATAL;
+               }
                zip_entry->next = zip->zip_entries;
                zip_entry->flags |= LA_FROM_CENTRAL_DIRECTORY;
                zip->zip_entries = zip_entry;

Modified: vendor/libarchive/dist/libarchive/test/test_sparse_basic.c
==============================================================================
--- vendor/libarchive/dist/libarchive/test/test_sparse_basic.c  Wed Sep 19 
09:41:44 2018        (r338796)
+++ vendor/libarchive/dist/libarchive/test/test_sparse_basic.c  Wed Sep 19 
10:26:45 2018        (r338797)
@@ -422,6 +422,7 @@ verify_sparse_file(struct archive *a, const char *path
        assert(sparse->type == END);
        assertEqualInt(expected_offset, archive_entry_size(ae));
 
+       failure(path);
        assertEqualInt(holes_seen, expected_holes);
 
        assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
@@ -457,6 +458,7 @@ verify_sparse_file2(struct archive *a, const char *pat
        /* Verify the number of holes only, not its offset nor its
         * length because those alignments are deeply dependence on
         * its filesystem. */ 
+       failure(path);
        assertEqualInt(blocks, archive_entry_sparse_count(ae));
        archive_entry_free(ae);
 }

Modified: vendor/libarchive/dist/test_utils/test_main.c
==============================================================================
--- vendor/libarchive/dist/test_utils/test_main.c       Wed Sep 19 09:41:44 
2018        (r338796)
+++ vendor/libarchive/dist/test_utils/test_main.c       Wed Sep 19 10:26:45 
2018        (r338797)
@@ -2166,7 +2166,7 @@ void assertVersion(const char *prog, const char *base)
 
        /* Skip arbitrary third-party version numbers. */
        while (s > 0 && (*q == ' ' || *q == '-' || *q == '/' || *q == '.' ||
-           isalnum(*q))) {
+           isalnum((unsigned char)*q))) {
                ++q;
                --s;
        }
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to