aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_write_set_format_v7tar.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2019-02-12 22:29:41 +0000
committerMartin Matuska <mm@FreeBSD.org>2019-02-12 22:29:41 +0000
commitfbb1b16ad8bc7a6f9a32424ddbd61e59ad5a4d4d (patch)
tree7032f8b865acde86f00b1124822b74bdb4be73f9 /libarchive/archive_write_set_format_v7tar.c
parentc6234fa1ee365085418a23124c988baf3d02c2fd (diff)
downloadsrc-fbb1b16ad8bc7a6f9a32424ddbd61e59ad5a4d4d.tar.gz
src-fbb1b16ad8bc7a6f9a32424ddbd61e59ad5a4d4d.zip
Update vendor/libarchive/dist to git 31c0a517c91f44eeee717a04db8b075cadda83d8
Relevant vendor changes: PR #1085: Fix a null pointer dereference bug in zip writer PR #1110: ZIP reader added support for XZ, LZMA, PPMD8 and BZIP2 decopmpression PR #1116: Add support for 64-bit ar format PR #1120: Fix a 7zip crash [1] and a ISO9660 infinite loop [2] PR #1125: RAR5 reader - fix an invalid read and a memory leak PR #1131: POSIX reader - do not fail when tree_current_lstat() fails due to ENOENT [3] PR #1134: Delete unnecessary null pointer checks before calls of free() OSS-Fuzz 10843: Force intermediate to uint64_t to make UBSAN happy. OSS-Fuzz 11011: Avoid buffer overflow in rar5 reader PR: 233006 [3] Security: CVE-2019-1000019 [1], CVE-2019-1000020 [2]
Notes
Notes: svn path=/vendor/libarchive/dist/; revision=344063
Diffstat (limited to 'libarchive/archive_write_set_format_v7tar.c')
-rw-r--r--libarchive/archive_write_set_format_v7tar.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libarchive/archive_write_set_format_v7tar.c b/libarchive/archive_write_set_format_v7tar.c
index 53c0db0e2041..1fdaafd2a939 100644
--- a/libarchive/archive_write_set_format_v7tar.c
+++ b/libarchive/archive_write_set_format_v7tar.c
@@ -330,14 +330,12 @@ archive_write_v7tar_header(struct archive_write *a, struct archive_entry *entry)
#endif
ret = format_header_v7tar(a, buff, entry, 1, sconv);
if (ret < ARCHIVE_WARN) {
- if (entry_main)
- archive_entry_free(entry_main);
+ archive_entry_free(entry_main);
return (ret);
}
ret2 = __archive_write_output(a, buff, 512);
if (ret2 < ARCHIVE_WARN) {
- if (entry_main)
- archive_entry_free(entry_main);
+ archive_entry_free(entry_main);
return (ret2);
}
if (ret2 < ret)
@@ -345,8 +343,7 @@ archive_write_v7tar_header(struct archive_write *a, struct archive_entry *entry)
v7tar->entry_bytes_remaining = archive_entry_size(entry);
v7tar->entry_padding = 0x1ff & (-(int64_t)v7tar->entry_bytes_remaining);
- if (entry_main)
- archive_entry_free(entry_main);
+ archive_entry_free(entry_main);
return (ret);
}