summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2012-09-16 17:31:12 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2012-09-16 17:31:12 +0000
commitf450a4bcb1cdc96fbb5acc012d119bf92c625919 (patch)
tree3ac070daca6089d5574dc85f6e5d8581fa034caa /media-libs/tiff
parentFix security bug #427166 (CVE-2012-3401) (diff)
downloadgentoo-2-f450a4bcb1cdc96fbb5acc012d119bf92c625919.tar.gz
gentoo-2-f450a4bcb1cdc96fbb5acc012d119bf92c625919.tar.bz2
gentoo-2-f450a4bcb1cdc96fbb5acc012d119bf92c625919.zip
Import patch from Fedora for endianess related test issues (test "raw_decode") wrt #422843
(Portage version: 2.2.0_alpha128/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/tiff')
-rw-r--r--media-libs/tiff/ChangeLog7
-rw-r--r--media-libs/tiff/files/tiff-4.0.2-bigendian.patch18
-rw-r--r--media-libs/tiff/tiff-4.0.2-r1.ebuild7
3 files changed, 29 insertions, 3 deletions
diff --git a/media-libs/tiff/ChangeLog b/media-libs/tiff/ChangeLog
index a7b04e8784c0..0fcc48372f28 100644
--- a/media-libs/tiff/ChangeLog
+++ b/media-libs/tiff/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-libs/tiff
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/tiff/ChangeLog,v 1.208 2012/09/16 17:24:43 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/tiff/ChangeLog,v 1.209 2012/09/16 17:31:12 ssuominen Exp $
+
+ 16 Sep 2012; Samuli Suominen <ssuominen@gentoo.org> tiff-4.0.2-r1.ebuild,
+ +files/tiff-4.0.2-bigendian.patch:
+ Import patch from Fedora for endianess related test issues (test
+ "raw_decode") wrt #422843
*tiff-4.0.2-r1 (16 Sep 2012)
diff --git a/media-libs/tiff/files/tiff-4.0.2-bigendian.patch b/media-libs/tiff/files/tiff-4.0.2-bigendian.patch
new file mode 100644
index 000000000000..3a090d26758c
--- /dev/null
+++ b/media-libs/tiff/files/tiff-4.0.2-bigendian.patch
@@ -0,0 +1,18 @@
+http://bugs.gentoo.org/422843
+http://pkgs.fedoraproject.org/cgit/libtiff.git/plain/libtiff-4.0.2-bigendian.patch
+http://pkgs.fedoraproject.org/cgit/libtiff.git/commit/?id=5f9a7dda1bb1991bf36f98ee37700c75433c9738
+
+--- test/raw_decode.c
++++ test/raw_decode.c
+@@ -85,9 +85,9 @@ static int check_rgb_pixel( int pixel, i
+ static int check_rgba_pixel( int pixel, int red, int green, int blue, int alpha, unsigned char *buffer ) {
+ /* RGBA images are upside down - adjust for normal ordering */
+ int adjusted_pixel = pixel % 128 + (127 - (pixel/128)) * 128;
+- unsigned char *rgba = buffer + 4 * adjusted_pixel;
++ unsigned int *rgba = (unsigned int*)(buffer + 4 * adjusted_pixel);
+
+- if( rgba[0] == red && rgba[1] == green && rgba[2] == blue && rgba[3] == alpha ) {
++ if( TIFFGetR(*rgba) == red && TIFFGetG(*rgba) == green && TIFFGetB(*rgba) == blue && TIFFGetA(*rgba) == alpha ) {
+ return 0;
+ }
+
diff --git a/media-libs/tiff/tiff-4.0.2-r1.ebuild b/media-libs/tiff/tiff-4.0.2-r1.ebuild
index c870a56b6b6d..5f0de8242d91 100644
--- a/media-libs/tiff/tiff-4.0.2-r1.ebuild
+++ b/media-libs/tiff/tiff-4.0.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/tiff/tiff-4.0.2-r1.ebuild,v 1.1 2012/09/16 17:24:43 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/tiff/tiff-4.0.2-r1.ebuild,v 1.2 2012/09/16 17:31:12 ssuominen Exp $
EAPI=4
inherit eutils libtool
@@ -22,7 +22,10 @@ RDEPEND="jpeg? ( virtual/jpeg )
DEPEND="${RDEPEND}"
src_prepare() {
- epatch "${FILESDIR}"/${P}-CVE-2012-3401.patch
+ epatch \
+ "${FILESDIR}"/${P}-CVE-2012-3401.patch \
+ "${FILESDIR}"/${P}-bigendian.patch
+
elibtoolize
}