PKGBUILDs/extra/p7zip/CVE-2017-17969.patch

27 lines
822 B
Diff
Raw Normal View History

2018-06-09 21:38:19 +00:00
From 79bca880ce7bcf07216c45f93afea545e0344418 Mon Sep 17 00:00:00 2001
From: aone <aone@keka.io>
Date: Mon, 5 Feb 2018 13:01:09 +0100
Subject: [PATCH] Security fix CVE-2017-17969
2018-02-05 19:18:10 +00:00
---
2018-06-09 21:38:19 +00:00
CPP/7zip/Compress/ShrinkDecoder.cpp | 5 +++++
1 file changed, 5 insertions(+)
2018-02-05 19:18:10 +00:00
diff --git a/CPP/7zip/Compress/ShrinkDecoder.cpp b/CPP/7zip/Compress/ShrinkDecoder.cpp
2018-06-09 21:38:19 +00:00
index 80b7e67..5bb0559 100644
2018-02-05 19:18:10 +00:00
--- a/CPP/7zip/Compress/ShrinkDecoder.cpp
+++ b/CPP/7zip/Compress/ShrinkDecoder.cpp
@@ -121,7 +121,12 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *
{
_stack[i++] = _suffixes[cur];
cur = _parents[cur];
2018-06-09 21:38:19 +00:00
+ if (cur >= kNumItems || i >= kNumItems)
+ break;
}
+
+ if (cur >= kNumItems || i >= kNumItems)
+ break;
2018-02-05 19:18:10 +00:00
_stack[i++] = (Byte)cur;
lastChar2 = (Byte)cur;