aboutsummaryrefslogtreecommitdiffstats
path: root/main/p7zip/CVE-2017-17969.patch
blob: af9e03931f1979265dc841981d03cfd7632361cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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;