wok-next view p7zip/stuff/patches/CVE-2017-17969.patch @ rev 20939

Fix brisk-menu, mate-backgrounds, mate-user-guide
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sun Aug 26 09:13:55 2018 +0300 (2018-08-26)
parents
children
line source
1 From: =?utf-8?q?Antoine_Beaupr=C3=A9?= <anarcat@debian.org>
2 Date: Sun, 28 Jan 2018 21:19:50 +0100
3 Subject: backport of the CVE-2017-17969 fix from 7zip 18.00-beta
5 ---
6 CPP/7zip/Compress/ShrinkDecoder.cpp | 7 ++++++-
7 1 file changed, 6 insertions(+), 1 deletion(-)
9 diff --git a/CPP/7zip/Compress/ShrinkDecoder.cpp b/CPP/7zip/Compress/ShrinkDecoder.cpp
10 index 80b7e67..4acdce5 100644
11 --- a/CPP/7zip/Compress/ShrinkDecoder.cpp
12 +++ b/CPP/7zip/Compress/ShrinkDecoder.cpp
13 @@ -121,7 +121,12 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *
14 {
15 _stack[i++] = _suffixes[cur];
16 cur = _parents[cur];
17 - }
18 + if (i >= kNumItems)
19 + break;
20 + }
21 +
22 + if (i >= kNumItems)
23 + break;
25 _stack[i++] = (Byte)cur;
26 lastChar2 = (Byte)cur;