aboutsummaryrefslogtreecommitdiffstats
path: root/main/p7zip/CVE-2017-17969.patch
diff options
context:
space:
mode:
authorDaniel Sabogal <dsabogalcc@gmail.com>2018-02-06 09:53:48 -0500
committerTimo Teräs <timo.teras@iki.fi>2018-02-06 16:48:23 +0000
commit2c5e07e07d00696e93c338f61e2879e2b12a2172 (patch)
tree2efd150dd4e0d0d7c75db3e488951e89ea844ef9 /main/p7zip/CVE-2017-17969.patch
parent8a00e9f5dcc3247c5297157928576f89a8d4f26a (diff)
downloadaports-2c5e07e07d00696e93c338f61e2879e2b12a2172.tar.bz2
aports-2c5e07e07d00696e93c338f61e2879e2b12a2172.tar.xz
main/p7zip: security fix for CVE-2017-17969, modernize
Diffstat (limited to 'main/p7zip/CVE-2017-17969.patch')
-rw-r--r--main/p7zip/CVE-2017-17969.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/main/p7zip/CVE-2017-17969.patch b/main/p7zip/CVE-2017-17969.patch
new file mode 100644
index 0000000000..af9e03931f
--- /dev/null
+++ b/main/p7zip/CVE-2017-17969.patch
@@ -0,0 +1,16 @@
+--- p7zip_16.02/CPP/7zip/Compress/ShrinkDecoder.cpp.orig
++++ p7zip_16.02/CPP/7zip/Compress/ShrinkDecoder.cpp
+@@ -121,7 +121,12 @@
+ {
+ _stack[i++] = _suffixes[cur];
+ cur = _parents[cur];
+- }
++ if (i >= kNumItems)
++ break;
++ }
++
++ if (i >= kNumItems)
++ break;
+
+ _stack[i++] = (Byte)cur;
+ lastChar2 = (Byte)cur;