From owner-svn-src-vendor@freebsd.org Mon Apr 3 12:22:57 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0980ED297CF; Mon, 3 Apr 2017 12:22:57 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D82A9CB0; Mon, 3 Apr 2017 12:22:56 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v33CMtXc068615; Mon, 3 Apr 2017 12:22:55 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v33CMthR068610; Mon, 3 Apr 2017 12:22:55 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201704031222.v33CMthR068610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Mon, 3 Apr 2017 12:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r316455 - in vendor/libarchive/dist: libarchive/test tar/test test_utils X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Apr 2017 12:22:57 -0000 Author: mm Date: Mon Apr 3 12:22:55 2017 New Revision: 316455 URL: https://svnweb.freebsd.org/changeset/base/316455 Log: Update vendor/libarchive to git 500a62194a1faafaffd286f6da50633e86587f3c Vendor changes (FreeBSD-related): Plug memory leaks in xattr tests. Modified: vendor/libarchive/dist/libarchive/test/test_xattr_platform.c vendor/libarchive/dist/tar/test/test_option_acls.c vendor/libarchive/dist/tar/test/test_option_xattrs.c vendor/libarchive/dist/test_utils/test_common.h vendor/libarchive/dist/test_utils/test_main.c Modified: vendor/libarchive/dist/libarchive/test/test_xattr_platform.c ============================================================================== --- vendor/libarchive/dist/libarchive/test/test_xattr_platform.c Mon Apr 3 11:46:32 2017 (r316454) +++ vendor/libarchive/dist/libarchive/test/test_xattr_platform.c Mon Apr 3 12:22:55 2017 (r316455) @@ -35,6 +35,7 @@ DEFINE_TEST(test_xattr_platform) struct archive_entry *ae; const char *name; const void *value; + void *rvalue; size_t size, insize; int e, r; const char *attrname = "user.libarchive.test"; @@ -95,8 +96,9 @@ DEFINE_TEST(test_xattr_platform) assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a)); assertEqualInt(ARCHIVE_OK, archive_write_free(a)); - value = getXattr("writetest", attrname, &insize); + rvalue = getXattr("writetest", attrname, &insize); if (assertEqualInt(insize, strlen(writeval) + 1) != 0) - assertEqualMem(value, writeval, insize); + assertEqualMem(rvalue, writeval, insize); + free(rvalue); #endif } Modified: vendor/libarchive/dist/tar/test/test_option_acls.c ============================================================================== --- vendor/libarchive/dist/tar/test/test_option_acls.c Mon Apr 3 11:46:32 2017 (r316454) +++ vendor/libarchive/dist/tar/test/test_option_acls.c Mon Apr 3 12:22:55 2017 (r316455) @@ -360,8 +360,10 @@ compare_acls(const char *path_a, const c if (richacl_a != NULL) { richacl_b = richacl_get_file(path_b); if (richacl_b == NULL && - (errno == ENODATA || errno == ENOTSUP || errno == ENOSYS)) + (errno == ENODATA || errno == ENOTSUP || errno == ENOSYS)) { + richacl_free(richacl_a); return (0); + } failure("richacl_get_file() error: %s (%s)", path_b, strerror(errno)); if (assert(richacl_b != NULL) == 0) { Modified: vendor/libarchive/dist/tar/test/test_option_xattrs.c ============================================================================== --- vendor/libarchive/dist/tar/test/test_option_xattrs.c Mon Apr 3 11:46:32 2017 (r316454) +++ vendor/libarchive/dist/tar/test/test_option_xattrs.c Mon Apr 3 12:22:55 2017 (r316455) @@ -33,7 +33,7 @@ DEFINE_TEST(test_option_xattrs) const char *testattr = "user.libarchive.test"; const char *testval = "testval"; - const void *readval; + void *readval; size_t size; int r; @@ -62,6 +62,7 @@ DEFINE_TEST(test_option_xattrs) readval = getXattr("xattrs_xattrs/f", testattr, &size); if(assertEqualInt(size, strlen(testval) + 1) != 0) assertEqualMem(readval, testval, size); + free(readval); /* Extract xattrs without xattrs */ assertMakeDir("xattrs_noxattrs", 0755); Modified: vendor/libarchive/dist/test_utils/test_common.h ============================================================================== --- vendor/libarchive/dist/test_utils/test_common.h Mon Apr 3 11:46:32 2017 (r316454) +++ vendor/libarchive/dist/test_utils/test_common.h Mon Apr 3 12:22:55 2017 (r316455) @@ -348,7 +348,7 @@ int canNodump(void); int setTestAcl(const char *path); /* Get extended attribute */ -const void *getXattr(const char *, const char *, size_t *); +void *getXattr(const char *, const char *, size_t *); /* Set extended attribute */ int setXattr(const char *, const char *, const void *, size_t); Modified: vendor/libarchive/dist/test_utils/test_main.c ============================================================================== --- vendor/libarchive/dist/test_utils/test_main.c Mon Apr 3 11:46:32 2017 (r316454) +++ vendor/libarchive/dist/test_utils/test_main.c Mon Apr 3 12:22:55 2017 (r316455) @@ -2451,8 +2451,8 @@ canNodump(void) return (0); } -/* Get extended attribute from a path */ -const void * +/* Get extended attribute value from a path */ +void * getXattr(const char *path, const char *name, size_t *sizep) { void *value = NULL;