aboutsummaryrefslogtreecommitdiffstats
path: root/cpio/cpio.c
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/cpio.c
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/cpio.c')
-rw-r--r--cpio/cpio.c3
1 files changed, 1 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;
}