aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_version_details.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2017-09-30 23:33:19 +0000
committerMartin Matuska <mm@FreeBSD.org>2017-09-30 23:33:19 +0000
commit533ab3c53efbfd230b718ed77dc9ea4d1446ddfc (patch)
tree7754efa68576e44389846bd73fad80a27240b0ba /libarchive/archive_version_details.c
parentb85c4c3da0a560cb98d13902c308e54fdeb52d70 (diff)
downloadsrc-533ab3c53efbfd230b718ed77dc9ea4d1446ddfc.tar.gz
src-533ab3c53efbfd230b718ed77dc9ea4d1446ddfc.zip
Update vendor/libarchive to git 92366744a52f3fa83c3899e375e415a5080a05f2
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) Security: CVE-2017-14166, CVE-2017-14502
Notes
Notes: svn path=/vendor/libarchive/dist/; revision=324145
Diffstat (limited to 'libarchive/archive_version_details.c')
-rw-r--r--libarchive/archive_version_details.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libarchive/archive_version_details.c b/libarchive/archive_version_details.c
index e10b83e5b7e4..2651503e6fda 100644
--- a/libarchive/archive_version_details.c
+++ b/libarchive/archive_version_details.c
@@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$");
#ifdef HAVE_LZ4_H
#include <lz4.h>
#endif
+#ifdef HAVE_ZSTD_H
+#include <zstd.h>
+#endif
#include "archive.h"
#include "archive_private.h"
@@ -59,6 +62,7 @@ archive_version_details(void)
const char *liblzma = archive_liblzma_version();
const char *bzlib = archive_bzlib_version();
const char *liblz4 = archive_liblz4_version();
+ const char *libzstd = archive_libzstd_version();
if (!init) {
archive_string_init(&str);
@@ -84,6 +88,10 @@ archive_version_details(void)
archive_strcat(&str, " liblz4/");
archive_strcat(&str, liblz4);
}
+ if (libzstd) {
+ archive_strcat(&str, " libzstd/");
+ archive_strcat(&str, libzstd);
+ }
}
return str.s;
}
@@ -131,3 +139,13 @@ archive_liblz4_version(void)
return NULL;
#endif
}
+
+const char *
+archive_libzstd_version(void)
+{
+#if HAVE_ZSTD_H && HAVE_LIBZSTD
+ return ZSTD_VERSION_STRING;
+#else
+ return NULL;
+#endif
+}