aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_write_add_filter_b64encode.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2019-12-28 23:40:32 +0000
committerMartin Matuska <mm@FreeBSD.org>2019-12-28 23:40:32 +0000
commit6922acad9a482c17c7af1acdb4d11d03f19bb1dc (patch)
treeb7e2717582504805f31e2195f7c74c5d6fa82a45 /libarchive/archive_write_add_filter_b64encode.c
parenta297901e6c90d415ac49c88002dd4e02dc49e32b (diff)
downloadsrc-6922acad9a482c17c7af1acdb4d11d03f19bb1dc.tar.gz
src-6922acad9a482c17c7af1acdb4d11d03f19bb1dc.zip
Update vendor/libarchive/dist to git 1dae5a549fe4ab99fd3a49a9edcf897a7b2b1844
Relevant vendor changes: Issue #351: Refactor and implement private state logic for write filters PR #1252: RAR5 reader - verify window size for solid files (OSS-Fuzz 15482) PR #1255: zip writer - don't append unused NUL for directories PR #1260: Fix sparse file offset overflow on 32-bit systems PR #1263: UNICODE filename support for reading lha/lzh format Issue #1276: Bugfix and optimize archive_wstring_append_from_mbs() PR #1288: Add the "xattrhdr" option to pax write options PR #1295: 7z reader - fix reading archives with digests in PackInfo PR #1296: RAR5 reader - verify window size for multivolume archives PR #1297: ZIP reader - support LZMA_STREAM_END marker in 'lzma alone' files Issue #1298: Fix a heap-buffer-overflow in archive_string_append_from_wcs() OSS-Fuzz 19360, 19362: LHA reader - plug two memory leaks on error Fix possible off-by-one when dealing with readlink(2)
Notes
Notes: svn path=/vendor/libarchive/dist/; revision=356163
Diffstat (limited to 'libarchive/archive_write_add_filter_b64encode.c')
-rw-r--r--libarchive/archive_write_add_filter_b64encode.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/libarchive/archive_write_add_filter_b64encode.c b/libarchive/archive_write_add_filter_b64encode.c
index b46b19a0c74d..87fdb73ecb09 100644
--- a/libarchive/archive_write_add_filter_b64encode.c
+++ b/libarchive/archive_write_add_filter_b64encode.c
@@ -149,11 +149,6 @@ archive_filter_b64encode_open(struct archive_write_filter *f)
{
struct private_b64encode *state = (struct private_b64encode *)f->data;
size_t bs = 65536, bpb;
- int ret;
-
- ret = __archive_write_open_filter(f->next_filter);
- if (ret != ARCHIVE_OK)
- return (ret);
if (f->archive->magic == ARCHIVE_WRITE_MAGIC) {
/* Buffer size should be a multiple number of the of bytes
@@ -266,7 +261,6 @@ static int
archive_filter_b64encode_close(struct archive_write_filter *f)
{
struct private_b64encode *state = (struct private_b64encode *)f->data;
- int ret, ret2;
/* Flush remaining bytes. */
if (state->hold_len != 0)
@@ -274,12 +268,8 @@ archive_filter_b64encode_close(struct archive_write_filter *f)
archive_string_sprintf(&state->encoded_buff, "====\n");
/* Write the last block */
archive_write_set_bytes_in_last_block(f->archive, 1);
- ret = __archive_write_filter(f->next_filter,
+ return __archive_write_filter(f->next_filter,
state->encoded_buff.s, archive_strlen(&state->encoded_buff));
- ret2 = __archive_write_close_filter(f->next_filter);
- if (ret > ret2)
- ret = ret2;
- return (ret);
}
static int