forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-libs/openexr: Revision bump to 2.2.0-r2
* Added patch to fix a typo in the C bindings * Added patch to install the missing header files * Added patch to fix security issues: CVE-2017-9110, CVE-2017-9111, CVE-2017-9112, CVE-2017-9113, CVE-2017-9114, CVE-2017-9115, CVE-2017-9116 * Fixed build system patch * Added tabs in the metadata.xml file Closes: https://bugs.gentoo.org/616996 Closes: https://bugs.gentoo.org/631382 Closes: https://bugs.gentoo.org/620324
- Loading branch information
Showing
6 changed files
with
256 additions
and
5 deletions.
There are no files selected for viewing
98 changes: 98 additions & 0 deletions
98
media-libs/openexr/files/openexr-2.2.0-CVE-2017-9110-to-9116-security-fixes.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
From c2b32f21cbe2db7c7ef485d62ffe9bec8eaa5165 Mon Sep 17 00:00:00 2001 | ||
From: Shawn Walker-Salas <[email protected]> | ||
Date: Tue, 30 May 2017 19:07:52 -0700 | ||
Subject: [PATCH] CVE-2017-{9110,9111,9112,9113,9114,9115,9116} fixes | ||
|
||
--- | ||
OpenEXR/IlmImf/ImfDwaCompressor.cpp | 7 ++++++- | ||
OpenEXR/IlmImf/ImfHuf.cpp | 10 ++++++---- | ||
OpenEXR/IlmImf/ImfPizCompressor.cpp | 6 ++++++ | ||
3 files changed, 18 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/IlmImf/ImfDwaCompressor.cpp b/IlmImf/ImfDwaCompressor.cpp | ||
index 1c1bd45..2ef8878 100644 | ||
--- a/IlmImf/ImfDwaCompressor.cpp | ||
+++ b/IlmImf/ImfDwaCompressor.cpp | ||
@@ -2377,7 +2377,12 @@ DwaCompressor::uncompress | ||
|
||
const char *dataPtr = inPtr + NUM_SIZES_SINGLE * sizeof(Int64); | ||
|
||
- if (inSize < headerSize + compressedSize) | ||
+ /* Both the sum and individual sizes are checked in case of overflow. */ | ||
+ if (inSize < (headerSize + compressedSize) || | ||
+ inSize < unknownCompressedSize || | ||
+ inSize < acCompressedSize || | ||
+ inSize < dcCompressedSize || | ||
+ inSize < rleCompressedSize) | ||
{ | ||
throw Iex::InputExc("Error uncompressing DWA data" | ||
"(truncated file)."); | ||
diff --git a/IlmImf/ImfHuf.cpp b/IlmImf/ImfHuf.cpp | ||
index a375d05..97909a5 100644 | ||
--- a/IlmImf/ImfHuf.cpp | ||
+++ b/IlmImf/ImfHuf.cpp | ||
@@ -822,7 +822,7 @@ hufEncode // return: output size (in bits) | ||
} | ||
|
||
|
||
-#define getCode(po, rlc, c, lc, in, out, oe) \ | ||
+#define getCode(po, rlc, c, lc, in, out, ob, oe)\ | ||
{ \ | ||
if (po == rlc) \ | ||
{ \ | ||
@@ -835,6 +835,8 @@ hufEncode // return: output size (in bits) | ||
\ | ||
if (out + cs > oe) \ | ||
tooMuchData(); \ | ||
+ else if (out - 1 < ob) \ | ||
+ notEnoughData(); \ | ||
\ | ||
unsigned short s = out[-1]; \ | ||
\ | ||
@@ -895,7 +897,7 @@ hufDecode | ||
// | ||
|
||
lc -= pl.len; | ||
- getCode (pl.lit, rlc, c, lc, in, out, oe); | ||
+ getCode (pl.lit, rlc, c, lc, in, out, outb, oe); | ||
} | ||
else | ||
{ | ||
@@ -925,7 +927,7 @@ hufDecode | ||
// | ||
|
||
lc -= l; | ||
- getCode (pl.p[j], rlc, c, lc, in, out, oe); | ||
+ getCode (pl.p[j], rlc, c, lc, in, out, outb, oe); | ||
break; | ||
} | ||
} | ||
@@ -952,7 +954,7 @@ hufDecode | ||
if (pl.len) | ||
{ | ||
lc -= pl.len; | ||
- getCode (pl.lit, rlc, c, lc, in, out, oe); | ||
+ getCode (pl.lit, rlc, c, lc, in, out, outb, oe); | ||
} | ||
else | ||
{ | ||
diff --git a/IlmImf/ImfPizCompressor.cpp b/IlmImf/ImfPizCompressor.cpp | ||
index 46c6fba..8b3ee38 100644 | ||
--- a/IlmImf/ImfPizCompressor.cpp | ||
+++ b/IlmImf/ImfPizCompressor.cpp | ||
@@ -573,6 +573,12 @@ PizCompressor::uncompress (const char *inPtr, | ||
int length; | ||
Xdr::read <CharPtrIO> (inPtr, length); | ||
|
||
+ if (length > inSize) | ||
+ { | ||
+ throw InputExc ("Error in header for PIZ-compressed data " | ||
+ "(invalid array length)."); | ||
+ } | ||
+ | ||
hufUncompress (inPtr, length, _tmpBuffer, tmpBufferEnd - _tmpBuffer); | ||
|
||
// | ||
-- | ||
2.14.1 | ||
|
26 changes: 26 additions & 0 deletions
26
media-libs/openexr/files/openexr-2.2.0-Fix-typo-in-C-bindings.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From c229dfe63380f41dfae1e977b10dfc7c49c7efc7 Mon Sep 17 00:00:00 2001 | ||
From: Edward Kmett <[email protected]> | ||
Date: Wed, 9 Dec 2015 12:15:48 -0500 | ||
Subject: [PATCH] Fix typo in C bindings (Close #140) | ||
|
||
IMF_RAMDOM_Y should be IMF_RANDOM_Y | ||
--- | ||
OpenEXR/IlmImf/ImfCRgbaFile.h | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/IlmImf/ImfCRgbaFile.h b/IlmImf/ImfCRgbaFile.h | ||
index 5ac2bf8..db58247 100644 | ||
--- a/IlmImf/ImfCRgbaFile.h | ||
+++ b/IlmImf/ImfCRgbaFile.h | ||
@@ -98,7 +98,7 @@ typedef struct ImfRgba ImfRgba; | ||
|
||
#define IMF_INCREASING_Y 0 | ||
#define IMF_DECREASING_Y 1 | ||
-#define IMF_RAMDOM_Y 2 | ||
+#define IMF_RANDOM_Y 2 | ||
|
||
|
||
/* | ||
-- | ||
2.14.1 | ||
|
60 changes: 60 additions & 0 deletions
60
media-libs/openexr/files/openexr-2.2.0-Install-missing-header-files.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
From a018f82655402421a995565dd4a5192259cbc207 Mon Sep 17 00:00:00 2001 | ||
From: Jonathan Scruggs <[email protected]> | ||
Date: Sat, 23 Sep 2017 10:36:40 +0100 | ||
Subject: [PATCH] OpenEXR: Install missing header files | ||
|
||
Some header files are not installed via Autotools, but are with | ||
CMake which breaks compatibility with certain programs. This patch | ||
enables Autotools to install these header files. | ||
|
||
Signed-off by: Jonathan Scruggs <[email protected]> | ||
--- | ||
OpenEXR/IlmImf/Makefile.am | 3 ++- | ||
OpenEXR/IlmImfUtil/Makefile.am | 17 +++++++++++++++++ | ||
2 files changed, 19 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/IlmImf/Makefile.am b/IlmImf/Makefile.am | ||
index a7c219c..b7b96ac 100644 | ||
--- a/IlmImf/Makefile.am | ||
+++ b/IlmImf/Makefile.am | ||
@@ -162,7 +162,8 @@ libIlmImfinclude_HEADERS = ImfForward.h ImfAttribute.h ImfBoxAttribute.h \ | ||
ImfMisc.h \ | ||
ImfPartHelper.h \ | ||
ImfDeepImageState.h \ | ||
- ImfDeepImageStateAttribute.h | ||
+ ImfDeepImageStateAttribute.h \ | ||
+ ImfFloatVectorAttribute.h | ||
|
||
noinst_HEADERS = ImfCompressor.h \ | ||
ImfRleCompressor.h \ | ||
diff --git a/IlmImfUtil/Makefile.am b/IlmImfUtil/Makefile.am | ||
index 8005ee1..e1d3674 100644 | ||
--- a/IlmImfUtil/Makefile.am | ||
+++ b/IlmImfUtil/Makefile.am | ||
@@ -33,6 +33,23 @@ libIlmImfUtil_la_LIBADD = -L$(top_builddir)/IlmImf $(ILMBASE_LIBS) -lIlmImf | ||
|
||
libIlmImfUtilincludedir = $(includedir)/OpenEXR | ||
|
||
+libIlmImfUtilinclude_HEADERS = ImfFlatImage.h \ | ||
+ ImfDeepImage.h \ | ||
+ ImfDeepImageChannel.h \ | ||
+ ImfImageLevel.h \ | ||
+ ImfDeepImageLevel.h \ | ||
+ ImfDeepImageIO.h \ | ||
+ ImfImageChannelRenaming.h \ | ||
+ ImfImageIO.h \ | ||
+ ImfFlatImageChannel.h \ | ||
+ ImfImage.h \ | ||
+ ImfFlatImageLevel.h \ | ||
+ ImfImageDataWindow.h \ | ||
+ ImfSampleCountChannel.h \ | ||
+ ImfFlatImageIO.h \ | ||
+ ImfImageChannel.h | ||
+ | ||
+ | ||
EXTRA_DIST = CMakeLists.txt | ||
|
||
INCLUDES = \ | ||
-- | ||
2.14.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="project"> | ||
<email>[email protected]</email> | ||
</maintainer> | ||
<maintainer type="project"> | ||
<email>[email protected]</email> | ||
</maintainer> | ||
<upstream> | ||
<remote-id type="github">openexr/openexr</remote-id> | ||
</upstream> | ||
</pkgmetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=6 | ||
|
||
inherit autotools multilib-minimal | ||
|
||
DESCRIPTION="ILM's OpenEXR high dynamic-range image file format libraries" | ||
HOMEPAGE="http://openexr.com/" | ||
SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz" | ||
|
||
LICENSE="BSD" | ||
SLOT="0/22" # based on SONAME | ||
KEYWORDS="~amd64 -arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" | ||
IUSE="cpu_flags_x86_avx examples static-libs" | ||
|
||
RDEPEND=" | ||
sys-libs/zlib[${MULTILIB_USEDEP}] | ||
>=media-libs/ilmbase-${PV}:=[${MULTILIB_USEDEP}]" | ||
DEPEND="${RDEPEND} | ||
virtual/pkgconfig[${MULTILIB_USEDEP}] | ||
>=sys-devel/autoconf-archive-2016.09.16" | ||
|
||
PATCHES=( | ||
"${FILESDIR}/${P}-fix-cpuid-on-abi_x86_32.patch" | ||
"${FILESDIR}/${P}-use-ull-for-64-bit-literals.patch" | ||
"${FILESDIR}/${P}-fix-build-system.patch" | ||
"${FILESDIR}/${P}-fix-config.h-collision.patch" | ||
"${FILESDIR}/${P}-Fix-typo-in-C-bindings.patch" | ||
"${FILESDIR}/${P}-Install-missing-header-files.patch" | ||
"${FILESDIR}/${P}-CVE-2017-9110-to-9116-security-fixes.patch" | ||
) | ||
|
||
src_prepare() { | ||
default | ||
# Fix path for testsuite | ||
sed -i -e "s:/var/tmp/:${T}:" IlmImfTest/tmpDir.h || die | ||
|
||
# delete stray config files causing havoc | ||
rm -f config*/OpenEXRConfig.h* || die | ||
|
||
eautoreconf | ||
} | ||
|
||
multilib_src_configure() { | ||
ECONF_SOURCE="${S}" econf \ | ||
--enable-threading \ | ||
$(use_enable cpu_flags_x86_avx avx) \ | ||
$(use_enable static-libs static) \ | ||
$(use_enable examples imfexamples) | ||
} | ||
|
||
multilib_src_install_all() { | ||
einstalldocs | ||
|
||
if use examples; then | ||
docompress -x /usr/share/doc/${PF}/examples | ||
else | ||
rm -rf "${ED%/}"/usr/share/doc/${PF}/examples || die | ||
fi | ||
|
||
# package provides .pc files | ||
find "${D}" -name '*.la' -delete || die | ||
} |