summaryrefslogtreecommitdiffstats
path: root/contrib/libarchive/libarchive/archive_read_support_format_7zip.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-10-12 11:41:26 -0300
committerRenato Botelho <renato@netgate.com>2016-10-12 11:41:26 -0300
commitcb642130dfc50717bb970a104c44aa7690930a38 (patch)
treec67f108534217a209198c6b201949ecc73acaba3 /contrib/libarchive/libarchive/archive_read_support_format_7zip.c
parent5dd7ab172435dc99e1abc1f7d73fd5e720050bbc (diff)
parentcd04fbc5e631c6b3e80a14eb7044c3be35fba2d2 (diff)
downloadFreeBSD-src-cb642130dfc50717bb970a104c44aa7690930a38.zip
FreeBSD-src-cb642130dfc50717bb970a104c44aa7690930a38.tar.gz
Merge remote-tracking branch 'origin/stable/11' into devel-11
Diffstat (limited to 'contrib/libarchive/libarchive/archive_read_support_format_7zip.c')
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_7zip.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/libarchive/libarchive/archive_read_support_format_7zip.c b/contrib/libarchive/libarchive/archive_read_support_format_7zip.c
index 1dfe52b..c0a536c 100644
--- a/contrib/libarchive/libarchive/archive_read_support_format_7zip.c
+++ b/contrib/libarchive/libarchive/archive_read_support_format_7zip.c
@@ -2431,6 +2431,8 @@ read_Header(struct archive_read *a, struct _7z_header_info *h,
switch (type) {
case kEmptyStream:
+ if (h->emptyStreamBools != NULL)
+ return (-1);
h->emptyStreamBools = calloc((size_t)zip->numFiles,
sizeof(*h->emptyStreamBools));
if (h->emptyStreamBools == NULL)
@@ -2451,6 +2453,8 @@ read_Header(struct archive_read *a, struct _7z_header_info *h,
return (-1);
break;
}
+ if (h->emptyFileBools != NULL)
+ return (-1);
h->emptyFileBools = calloc(empty_streams,
sizeof(*h->emptyFileBools));
if (h->emptyFileBools == NULL)
@@ -2465,6 +2469,8 @@ read_Header(struct archive_read *a, struct _7z_header_info *h,
return (-1);
break;
}
+ if (h->antiBools != NULL)
+ return (-1);
h->antiBools = calloc(empty_streams,
sizeof(*h->antiBools));
if (h->antiBools == NULL)
@@ -2491,6 +2497,8 @@ read_Header(struct archive_read *a, struct _7z_header_info *h,
if ((ll & 1) || ll < zip->numFiles * 4)
return (-1);
+ if (zip->entry_names != NULL)
+ return (-1);
zip->entry_names = malloc(ll);
if (zip->entry_names == NULL)
return (-1);
@@ -2543,6 +2551,8 @@ read_Header(struct archive_read *a, struct _7z_header_info *h,
if ((p = header_bytes(a, 2)) == NULL)
return (-1);
allAreDefined = *p;
+ if (h->attrBools != NULL)
+ return (-1);
h->attrBools = calloc((size_t)zip->numFiles,
sizeof(*h->attrBools));
if (h->attrBools == NULL)
OpenPOWER on IntegriCloud