diff options
author | Martin Matuska <mm@FreeBSD.org> | 2017-10-01 00:40:23 +0000 |
---|---|---|
committer | Martin Matuska <mm@FreeBSD.org> | 2017-10-01 00:40:23 +0000 |
commit | 5c831a5bd61576cacb48b39f8eeb47b92707a355 (patch) | |
tree | 315046b4d3237811245bd68cfa0099291b843129 /contrib/libarchive/test_utils | |
parent | 0ffc7ed7e310f5810af6c04137678d0bef00f2f0 (diff) | |
parent | 533ab3c53efbfd230b718ed77dc9ea4d1446ddfc (diff) | |
download | src-5c831a5bd61576cacb48b39f8eeb47b92707a355.tar.gz src-5c831a5bd61576cacb48b39f8eeb47b92707a355.zip |
MFV r324145,324147:
Sync libarchive with vendor.
Relevant vendor changes:
PR #905: Support for Zstandard read and write filters
PR #922: Avoid overflow when reading corrupt cpio archive
Issue #935: heap-based buffer overflow in xml_data (CVE-2017-14166)
OSS-Fuzz 2936: Place a limit on the mtree line length
OSS-Fuzz 2394: Ensure that the ZIP AES extension header is large enough
OSS-Fuzz 573: Read off-by-one error in RAR archives (CVE-2017-14502)
MFC after: 1 week
Security: CVE-2017-14166, CVE-2017-14502
Notes
Notes:
svn path=/head/; revision=324148
Diffstat (limited to 'contrib/libarchive/test_utils')
-rw-r--r-- | contrib/libarchive/test_utils/test_common.h | 3 | ||||
-rw-r--r-- | contrib/libarchive/test_utils/test_main.c | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/contrib/libarchive/test_utils/test_common.h b/contrib/libarchive/test_utils/test_common.h index 1425dd84b7df..dd7e41016d52 100644 --- a/contrib/libarchive/test_utils/test_common.h +++ b/contrib/libarchive/test_utils/test_common.h @@ -329,6 +329,9 @@ int canLrzip(void); /* Return true if this platform can run the "lz4" program. */ int canLz4(void); +/* Return true if this platform can run the "zstd" program. */ +int canZstd(void); + /* Return true if this platform can run the "lzip" program. */ int canLzip(void); diff --git a/contrib/libarchive/test_utils/test_main.c b/contrib/libarchive/test_utils/test_main.c index 0e1413693f4a..0e8cc9fc56a2 100644 --- a/contrib/libarchive/test_utils/test_main.c +++ b/contrib/libarchive/test_utils/test_main.c @@ -2319,6 +2319,21 @@ canLz4(void) } /* + * Can this platform run the zstd program? + */ +int +canZstd(void) +{ + static int tested = 0, value = 0; + if (!tested) { + tested = 1; + if (systemf("zstd -V %s", redirectArgs) == 0) + value = 1; + } + return (value); +} + +/* * Can this platform run the lzip program? */ int |