aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_read_support_format_7zip.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2020-02-11 23:48:03 +0000
committerMartin Matuska <mm@FreeBSD.org>2020-02-11 23:48:03 +0000
commit8185c4ae244f9a52ad987b36e7d6300500054d00 (patch)
tree11e2d7cd0caf20998ed1e1146e1c1d7fc747165e /libarchive/archive_read_support_format_7zip.c
parent98c1f51f769841d99d879099f9075ff60d51ee4a (diff)
downloadsrc-8185c4ae244f9a52ad987b36e7d6300500054d00.tar.gz
src-8185c4ae244f9a52ad987b36e7d6300500054d00.zip
Update vendor/libarchive/dist to git 3288ebb0353beb51dfb09d444dedbe9235ead53dvendor/libarchive/3.4.2
Libarchive 3.4.2 Relevant vendor changes: PR #1289: atomic extraction support (bsdtar -x --safe-writes) PR #1308: big endian fix for UTF16 support in LHA reader PR #1326: reject RAR5 files that declare invalid header flags Issue #987: fix support 7z archive entries with Delta filter Issue #1317: fix compression output buffer handling in XAR writer Issue #1319: fix uname or gname longer than 32 characters in pax writer Issue #1325: fix use after free when archiving hardlinks in ISO9660 or XAR Use localtime_r() and gmtime_r() instead of localtime() and gmtime()
Notes
Notes: svn path=/vendor/libarchive/dist/; revision=357783 svn path=/vendor/libarchive/3.4.2/; revision=357784; tag=vendor/libarchive/3.4.2
Diffstat (limited to 'libarchive/archive_read_support_format_7zip.c')
-rw-r--r--libarchive/archive_read_support_format_7zip.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libarchive/archive_read_support_format_7zip.c b/libarchive/archive_read_support_format_7zip.c
index 87c6c5272197..6ce9d1a0e1bb 100644
--- a/libarchive/archive_read_support_format_7zip.c
+++ b/libarchive/archive_read_support_format_7zip.c
@@ -1086,10 +1086,17 @@ init_decompression(struct archive_read *a, struct _7zip *zip,
zip->bcj_state = 0;
break;
case _7Z_DELTA:
+ if (coder2->propertiesSize != 1) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Invalid Delta parameter");
+ return (ARCHIVE_FAILED);
+ }
filters[fi].id = LZMA_FILTER_DELTA;
memset(&delta_opt, 0, sizeof(delta_opt));
delta_opt.type = LZMA_DELTA_TYPE_BYTE;
- delta_opt.dist = 1;
+ delta_opt.dist =
+ (uint32_t)coder2->properties[0] + 1;
filters[fi].options = &delta_opt;
fi++;
break;