aboutsummaryrefslogtreecommitdiffstats
path: root/cpio
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2016-12-15 15:35:53 +0000
committerMartin Matuska <mm@FreeBSD.org>2016-12-15 15:35:53 +0000
commit8e86d3576b5d090c0d44d5fd2c4829fce64e3b34 (patch)
tree4d5481886c664d296875d9d996ccd3f5ae8090cb /cpio
parentf428c3b114eca361b2c069d987e95553368cd827 (diff)
downloadsrc-8e86d3576b5d090c0d44d5fd2c4829fce64e3b34.tar.gz
src-8e86d3576b5d090c0d44d5fd2c4829fce64e3b34.zip
Update vendor/libarchive to git to 30528ed7a9f479f1c363ee8cfa1c5eb4c7d9be10
Vendor bugfixes: PR 826: OpenSSL 1.1 support PR 830, 831, 833: Spelling fixes OSS-Fuzz 227, 230, 239: Fix possible memory leak in archive_read_free() OSS-Fuzz 237: Fix heap buffer overflow when reading invalid ar archives
Notes
Notes: svn path=/vendor/libarchive/dist/; revision=310115
Diffstat (limited to 'cpio')
-rw-r--r--cpio/cpio.c3
-rw-r--r--cpio/test/test_option_lz4.c7
2 files changed, 8 insertions, 2 deletions
diff --git a/cpio/cpio.c b/cpio/cpio.c
index c11ac163122d..373e6da787f5 100644
--- a/cpio/cpio.c
+++ b/cpio/cpio.c
@@ -1324,10 +1324,9 @@ lookup_name(struct cpio *cpio, struct name_cache **name_cache_variable,
if (*name_cache_variable == NULL) {
- *name_cache_variable = malloc(sizeof(struct name_cache));
+ *name_cache_variable = calloc(1, sizeof(struct name_cache));
if (*name_cache_variable == NULL)
lafe_errc(1, ENOMEM, "No more memory");
- memset(*name_cache_variable, 0, sizeof(struct name_cache));
(*name_cache_variable)->size = name_cache_size;
}
diff --git a/cpio/test/test_option_lz4.c b/cpio/test/test_option_lz4.c
index d430ac755f4f..afd683ddc773 100644
--- a/cpio/test/test_option_lz4.c
+++ b/cpio/test/test_option_lz4.c
@@ -63,6 +63,13 @@ DEFINE_TEST(test_option_lz4)
"but no such program is available on this system.");
return;
}
+ /* On some systems the error won't be detected until closing
+ time, by a 127 exit error returned by waitpid. */
+ if (strstr(p, "Error closing") != NULL && !canLz4()) {
+ skipping("This version of bsdcpio uses an external lz4 program "
+ "but no such program is available on this system.");
+ return;
+ }
failure("--lz4 option is broken: %s", p);
assertEqualInt(r, 0);
return;