summaryrefslogtreecommitdiff
path: root/source/l/openexr
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2018-05-28 19:12:29 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 23:39:35 +0200
commit646a5c1cbfd95873950a87b5f75d52073a967023 (patch)
treeb8b8d2ab3b0d432ea69ad1a64d1c789649d65020 /source/l/openexr
parentd31c50870d0bee042ce660e445c9294a59a3a65b (diff)
downloadcurrent-646a5c1cbfd95873950a87b5f75d52073a967023.tar.gz
Mon May 28 19:12:29 UTC 201820180528191229
a/pkgtools-15.0-noarch-13.txz: Rebuilt. installpkg: default line length for --terselength is the number of columns. removepkg: added --terse mode. upgradepkg: default line length for --terselength is the number of columns. upgradepkg: accept -option in addition to --option. ap/vim-8.1.0026-x86_64-1.txz: Upgraded. d/bison-3.0.5-x86_64-1.txz: Upgraded. e/emacs-26.1-x86_64-1.txz: Upgraded. kde/kopete-4.14.3-x86_64-8.txz: Rebuilt. Recompiled against libidn-1.35. n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded. n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded. n/libnftnl-1.1.0-x86_64-1.txz: Upgraded. n/links-2.16-x86_64-2.txz: Rebuilt. Rebuilt to enable X driver for -g mode. n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded. n/nftables-0.8.5-x86_64-1.txz: Upgraded. n/p11-kit-0.23.11-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-1.txz: Upgraded. n/whois-5.3.1-x86_64-1.txz: Upgraded. xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded. xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/l/openexr')
-rw-r--r--source/l/openexr/openexr.CVE-2017-9110-to-9116.patch82
-rwxr-xr-xsource/l/openexr/openexr.SlackBuild32
-rw-r--r--source/l/openexr/slack-desc8
3 files changed, 109 insertions, 13 deletions
diff --git a/source/l/openexr/openexr.CVE-2017-9110-to-9116.patch b/source/l/openexr/openexr.CVE-2017-9110-to-9116.patch
new file mode 100644
index 00000000..98c03a99
--- /dev/null
+++ b/source/l/openexr/openexr.CVE-2017-9110-to-9116.patch
@@ -0,0 +1,82 @@
+--- 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);
+
+ //
diff --git a/source/l/openexr/openexr.SlackBuild b/source/l/openexr/openexr.SlackBuild
index 3be5b97b..0610c1a6 100755
--- a/source/l/openexr/openexr.SlackBuild
+++ b/source/l/openexr/openexr.SlackBuild
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2007, 2013, 2014 Heinz Wiesinger, Amsterdam, The Netherlands
-# Copyright 2008, 2009, 2010, 2014 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2014, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,29 +23,37 @@
# Modified by Robby Workman <rworkman@slackware.com>
+cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=openexr
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
-NUMJOBS=${NUMJOBS:--j6}
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+NUMJOBS=${NUMJOBS:--j7}
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -71,6 +79,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Patch security issues:
+zcat $CWD/openexr.CVE-2017-9110-to-9116.patch.gz | patch -p1 --verbose || exit 1
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -79,11 +90,14 @@ CXXFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-static \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
diff --git a/source/l/openexr/slack-desc b/source/l/openexr/slack-desc
index cf0b46a6..1e830614 100644
--- a/source/l/openexr/slack-desc
+++ b/source/l/openexr/slack-desc
@@ -1,15 +1,15 @@
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
openexr: openexr (HDR Image File Format & Library)
openexr:
openexr: OpenEXR is an image file format and library developed by Industrial
-openexr: Light & Magic, and later released to the public. It provides support
+openexr: Light & Magic, and later released to the public. It provides support
openexr: for high dynamic range and a 16-bit floating point "half" data type
openexr: which is compatible with the half data type in the Cg programming
openexr: language.