From 8e86d3576b5d090c0d44d5fd2c4829fce64e3b34 Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Thu, 15 Dec 2016 15:35:53 +0000 Subject: 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 --- cpio/cpio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cpio/cpio.c') 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; } -- cgit v1.2.3