summaryrefslogtreecommitdiff
path: root/system/libarchive/CVE-2017-14166.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-03-01 14:30:19 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-03-01 14:30:19 -0600
commit85c3ec8d2336ffa2dcaa24e2ca939d1453d6efd6 (patch)
treef6c8971f66d59953cf6e19420dd0db1ca749e9f7 /system/libarchive/CVE-2017-14166.patch
parent35064038bbcb66bb98f0f6714abd90a6734c414f (diff)
downloadpackages-85c3ec8d2336ffa2dcaa24e2ca939d1453d6efd6.tar.gz
packages-85c3ec8d2336ffa2dcaa24e2ca939d1453d6efd6.tar.bz2
packages-85c3ec8d2336ffa2dcaa24e2ca939d1453d6efd6.tar.xz
packages-85c3ec8d2336ffa2dcaa24e2ca939d1453d6efd6.zip
system/libarchive: bring patched version in
Diffstat (limited to 'system/libarchive/CVE-2017-14166.patch')
-rw-r--r--system/libarchive/CVE-2017-14166.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/system/libarchive/CVE-2017-14166.patch b/system/libarchive/CVE-2017-14166.patch
new file mode 100644
index 000000000..b729ae41e
--- /dev/null
+++ b/system/libarchive/CVE-2017-14166.patch
@@ -0,0 +1,36 @@
+From fa7438a0ff4033e4741c807394a9af6207940d71 Mon Sep 17 00:00:00 2001
+From: Joerg Sonnenberger <joerg@bec.de>
+Date: Tue, 5 Sep 2017 18:12:19 +0200
+Subject: [PATCH] Do something sensible for empty strings to make fuzzers
+ happy.
+
+---
+ libarchive/archive_read_support_format_xar.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/libarchive/archive_read_support_format_xar.c b/libarchive/archive_read_support_format_xar.c
+index 7a22beb9d..93eeacc5e 100644
+--- a/libarchive/archive_read_support_format_xar.c
++++ b/libarchive/archive_read_support_format_xar.c
+@@ -1040,6 +1040,9 @@ atol10(const char *p, size_t char_cnt)
+ uint64_t l;
+ int digit;
+
++ if (char_cnt == 0)
++ return (0);
++
+ l = 0;
+ digit = *p - '0';
+ while (digit >= 0 && digit < 10 && char_cnt-- > 0) {
+@@ -1054,7 +1057,10 @@ atol8(const char *p, size_t char_cnt)
+ {
+ int64_t l;
+ int digit;
+-
++
++ if (char_cnt == 0)
++ return (0);
++
+ l = 0;
+ while (char_cnt-- > 0) {
+ if (*p >= '0' && *p <= '7')