From abfcc20018f6e26c0254ec1823b0888a9281aa4b Mon Sep 17 00:00:00 2001 From: Helmut Pozimski Date: Mon, 5 Feb 2018 11:35:34 +0100 Subject: [PATCH] p7zip: add patch for CVE-2017-17969 patch taken from the Debian package: https://anonscm.debian.org/cgit/users/robert/p7zip.git/tree/debian/patches/13-CVE-2017-17969.patch Closes: #11399 [via git-merge-pr] --- srcpkgs/p7zip/patches/CVE-2017-17969.patch | 26 ++++++++++++++++++++++ srcpkgs/p7zip/template | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/p7zip/patches/CVE-2017-17969.patch diff --git a/srcpkgs/p7zip/patches/CVE-2017-17969.patch b/srcpkgs/p7zip/patches/CVE-2017-17969.patch new file mode 100644 index 0000000000..c5487304c4 --- /dev/null +++ b/srcpkgs/p7zip/patches/CVE-2017-17969.patch @@ -0,0 +1,26 @@ +From: =?utf-8?q?Antoine_Beaupr=C3=A9?= +Date: Sun, 28 Jan 2018 21:19:50 +0100 +Subject: backport of the CVE-2017-17969 fix from 7zip 18.00-beta + +--- + CPP/7zip/Compress/ShrinkDecoder.cpp | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/CPP/7zip/Compress/ShrinkDecoder.cpp b/CPP/7zip/Compress/ShrinkDecoder.cpp +index 80b7e67..4acdce5 100644 +--- CPP/7zip/Compress/ShrinkDecoder.cpp ++++ CPP/7zip/Compress/ShrinkDecoder.cpp +@@ -121,7 +121,12 @@ HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream * + { + _stack[i++] = _suffixes[cur]; + cur = _parents[cur]; +- } ++ if (i >= kNumItems) ++ break; ++ } ++ ++ if (i >= kNumItems) ++ break; + + _stack[i++] = (Byte)cur; + lastChar2 = (Byte)cur; diff --git a/srcpkgs/p7zip/template b/srcpkgs/p7zip/template index ad7e3020f4..44d11ad4c1 100644 --- a/srcpkgs/p7zip/template +++ b/srcpkgs/p7zip/template @@ -1,7 +1,7 @@ # Template file for 'p7zip' pkgname=p7zip version=16.02 -revision=2 +revision=3 wrksrc="${pkgname}_${version}" hostmakedepends="yasm nasm" short_desc="Command-line version of the 7zip compressed file archive"