aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_read_support_format_tar.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_read_support_format_tar.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_read_support_format_tar.c')
-rw-r--r--libarchive/archive_read_support_format_tar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libarchive/archive_read_support_format_tar.c b/libarchive/archive_read_support_format_tar.c
index 30d5bc83c321..c3b1ecb66052 100644
--- a/libarchive/archive_read_support_format_tar.c
+++ b/libarchive/archive_read_support_format_tar.c
@@ -2241,7 +2241,7 @@ gnu_add_sparse_entry(struct archive_read *a, struct tar *tar,
else
tar->sparse_list = p;
tar->sparse_last = p;
- if (remaining < 0 || offset < 0) {
+ if (remaining < 0 || offset < 0 || offset > INT64_MAX - remaining) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Malformed sparse map data");
return (ARCHIVE_FATAL);
}