summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2011-09-23 18:25:09 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2011-09-23 18:25:09 +0000
commit56171df203fbc734ae0f5e6c719892673de68d64 (patch)
tree1b248161134b4b68ed6d4d76082859b37101c010
parentVersion bump (diff)
downloadgentoo-2-56171df203fbc734ae0f5e6c719892673de68d64.tar.gz
gentoo-2-56171df203fbc734ae0f5e6c719892673de68d64.tar.bz2
gentoo-2-56171df203fbc734ae0f5e6c719892673de68d64.zip
Revbump for CVE-2011-3328, till proper apng patch is rolled out
(Portage version: 2.2.0_alpha59/cvs/Linux x86_64)
-rw-r--r--media-libs/libpng/ChangeLog8
-rw-r--r--media-libs/libpng/files/libpng-1.5.4-CVE-2011-3328.patch23
-rw-r--r--media-libs/libpng/libpng-1.5.4-r1.ebuild (renamed from media-libs/libpng/libpng-1.5.4.ebuild)3
3 files changed, 32 insertions, 2 deletions
diff --git a/media-libs/libpng/ChangeLog b/media-libs/libpng/ChangeLog
index 33b33303c872..2bb583c4cd79 100644
--- a/media-libs/libpng/ChangeLog
+++ b/media-libs/libpng/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-libs/libpng
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libpng/ChangeLog,v 1.302 2011/09/20 20:31:14 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libpng/ChangeLog,v 1.303 2011/09/23 18:25:09 xarthisius Exp $
+
+*libpng-1.5.4-r1 (23 Sep 2011)
+
+ 23 Sep 2011; Kacper Kowalik <xarthisius@gentoo.org> -libpng-1.5.4.ebuild,
+ +libpng-1.5.4-r1.ebuild, +files/libpng-1.5.4-CVE-2011-3328.patch:
+ Revbump for CVE-2011-3328, till proper apng patch is rolled out
20 Sep 2011; Fabian Groffen <grobian@gentoo.org> libpng-1.4.8-r2.ebuild:
Fix installation on Darwin
diff --git a/media-libs/libpng/files/libpng-1.5.4-CVE-2011-3328.patch b/media-libs/libpng/files/libpng-1.5.4-CVE-2011-3328.patch
new file mode 100644
index 000000000000..bcfdc119b193
--- /dev/null
+++ b/media-libs/libpng/files/libpng-1.5.4-CVE-2011-3328.patch
@@ -0,0 +1,23 @@
+--- pngrutil.c.orig 2011-09-23 20:20:43.974170436 +0200
++++ pngrutil.c 2011-09-23 20:21:41.308119496 +0200
+@@ -1037,12 +1037,14 @@
+ */
+ png_uint_32 w = y_red + y_green + y_blue;
+
+- png_ptr->rgb_to_gray_red_coeff = (png_uint_16)(((png_uint_32)y_red *
+- 32768)/w);
+- png_ptr->rgb_to_gray_green_coeff = (png_uint_16)(((png_uint_32)y_green
+- * 32768)/w);
+- png_ptr->rgb_to_gray_blue_coeff = (png_uint_16)(((png_uint_32)y_blue *
+- 32768)/w);
++ if (w != 0) {
++ png_ptr->rgb_to_gray_red_coeff = (png_uint_16)(((png_uint_32)y_red *
++ 32768)/w);
++ png_ptr->rgb_to_gray_green_coeff = (png_uint_16)(((png_uint_32)y_green
++ * 32768)/w);
++ png_ptr->rgb_to_gray_blue_coeff = (png_uint_16)(((png_uint_32)y_blue *
++ 32768)/w);
++ }
+ }
+ }
+ #endif
diff --git a/media-libs/libpng/libpng-1.5.4.ebuild b/media-libs/libpng/libpng-1.5.4-r1.ebuild
index 8a94c7fd1ba3..85c4a0a6c61f 100644
--- a/media-libs/libpng/libpng-1.5.4.ebuild
+++ b/media-libs/libpng/libpng-1.5.4-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libpng/libpng-1.5.4.ebuild,v 1.2 2011/09/17 17:52:35 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libpng/libpng-1.5.4-r1.ebuild,v 1.1 2011/09/23 18:25:09 xarthisius Exp $
EAPI=4
@@ -23,6 +23,7 @@ DEPEND="${RDEPEND}
DOCS=( ANNOUNCE CHANGES libpng-manual.txt README TODO )
src_prepare() {
+ epatch "${FILESDIR}"/${P}-CVE-2011-3328.patch
use apng && epatch "${WORKDIR}"/${P}-apng.patch
elibtoolize
}