parent
178154db11
commit
7db88227fe
@ -1,26 +1,26 @@
|
|||||||
From: =?utf-8?q?Antoine_Beaupr=C3=A9?= <anarcat@debian.org>
|
From 79bca880ce7bcf07216c45f93afea545e0344418 Mon Sep 17 00:00:00 2001
|
||||||
Date: Sun, 28 Jan 2018 21:19:50 +0100
|
From: aone <aone@keka.io>
|
||||||
Subject: backport of the CVE-2017-17969 fix from 7zip 18.00-beta
|
Date: Mon, 5 Feb 2018 13:01:09 +0100
|
||||||
|
Subject: [PATCH] Security fix CVE-2017-17969
|
||||||
|
|
||||||
---
|
---
|
||||||
CPP/7zip/Compress/ShrinkDecoder.cpp | 7 ++++++-
|
CPP/7zip/Compress/ShrinkDecoder.cpp | 5 +++++
|
||||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
diff --git a/CPP/7zip/Compress/ShrinkDecoder.cpp b/CPP/7zip/Compress/ShrinkDecoder.cpp
|
diff --git a/CPP/7zip/Compress/ShrinkDecoder.cpp b/CPP/7zip/Compress/ShrinkDecoder.cpp
|
||||||
index 80b7e67..4acdce5 100644
|
index 80b7e67..5bb0559 100644
|
||||||
--- a/CPP/7zip/Compress/ShrinkDecoder.cpp
|
--- a/CPP/7zip/Compress/ShrinkDecoder.cpp
|
||||||
+++ b/CPP/7zip/Compress/ShrinkDecoder.cpp
|
+++ b/CPP/7zip/Compress/ShrinkDecoder.cpp
|
||||||
@@ -121,7 +121,12 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *
|
@@ -121,7 +121,12 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *
|
||||||
{
|
{
|
||||||
_stack[i++] = _suffixes[cur];
|
_stack[i++] = _suffixes[cur];
|
||||||
cur = _parents[cur];
|
cur = _parents[cur];
|
||||||
- }
|
+ if (cur >= kNumItems || i >= kNumItems)
|
||||||
+ if (i >= kNumItems)
|
+ break;
|
||||||
+ break;
|
}
|
||||||
+ }
|
|
||||||
+
|
+
|
||||||
+ if (i >= kNumItems)
|
+ if (cur >= kNumItems || i >= kNumItems)
|
||||||
+ break;
|
+ break;
|
||||||
|
|
||||||
_stack[i++] = (Byte)cur;
|
_stack[i++] = (Byte)cur;
|
||||||
lastChar2 = (Byte)cur;
|
lastChar2 = (Byte)cur;
|
Loading…
Reference in new issue