summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-text/poppler/ChangeLog8
-rw-r--r--app-text/poppler/files/digest-poppler-0.5.4-r23
-rw-r--r--app-text/poppler/files/poppler-cve-2007-3387.patch32
-rw-r--r--app-text/poppler/poppler-0.5.4-r2.ebuild50
4 files changed, 92 insertions, 1 deletions
diff --git a/app-text/poppler/ChangeLog b/app-text/poppler/ChangeLog
index 2942e970eab6..aaec913f15d0 100644
--- a/app-text/poppler/ChangeLog
+++ b/app-text/poppler/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-text/poppler
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/poppler/ChangeLog,v 1.129 2007/08/23 18:21:09 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/poppler/ChangeLog,v 1.130 2007/08/23 19:05:59 genstef Exp $
+
+*poppler-0.5.4-r2 (23 Aug 2007)
+
+ 23 Aug 2007; Stefan Schweizer <genstef@gentoo.org>
+ +files/poppler-cve-2007-3387.patch, +poppler-0.5.4-r2.ebuild:
+ Backport security patch thanks to steev, bug 188863
23 Aug 2007; Jeroen Roovers <jer@gentoo.org> poppler-0.5.91.ebuild:
Stable for HPPA (bug #188863).
diff --git a/app-text/poppler/files/digest-poppler-0.5.4-r2 b/app-text/poppler/files/digest-poppler-0.5.4-r2
new file mode 100644
index 000000000000..3cf1476067e6
--- /dev/null
+++ b/app-text/poppler/files/digest-poppler-0.5.4-r2
@@ -0,0 +1,3 @@
+MD5 053fdfd70533ecce1a06353fa945f061 poppler-0.5.4.tar.gz 1062401
+RMD160 f28c89b03388757067505df3c60a1d878626b0dd poppler-0.5.4.tar.gz 1062401
+SHA256 ca0f880a4ff07391e99b443f0e7c9860241df6a6aaa327b9d811b358d94a29c9 poppler-0.5.4.tar.gz 1062401
diff --git a/app-text/poppler/files/poppler-cve-2007-3387.patch b/app-text/poppler/files/poppler-cve-2007-3387.patch
new file mode 100644
index 000000000000..2e174e1c0063
--- /dev/null
+++ b/app-text/poppler/files/poppler-cve-2007-3387.patch
@@ -0,0 +1,32 @@
+diff -Nur poppler-0.5.4/poppler/Stream.cc poppler-0.5.4.new/poppler/Stream.cc
+--- poppler-0.5.4/poppler/Stream.cc 2006-07-28 11:07:41.000000000 -0700
++++ poppler-0.5.4.new/poppler/Stream.cc 2007-08-07 11:29:59.854631893 -0700
+@@ -422,21 +422,14 @@
+ ok = gFalse;
+
+ nVals = width * nComps;
+- if (width <= 0 || nComps <= 0 || nBits <= 0 ||
+- nComps >= INT_MAX/nBits ||
+- width >= INT_MAX/nComps/nBits ||
+- nVals * nBits + 7 < 0) {
+- return;
+- }
+- totalBits = nVals * nBits;
+- if (totalBits == 0 ||
+- (totalBits / nBits) / nComps != width ||
+- totalBits + 7 < 0) {
+- return;
+- }
+ pixBytes = (nComps * nBits + 7) >> 3;
+- rowBytes = ((totalBits + 7) >> 3) + pixBytes;
+- if (rowBytes < 0) {
++ rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes;
++ if (width <= 0 || nComps <= 0 || nBits <= 0 ||
++ nComps > gfxColorMaxComps ||
++ nBits > 16 ||
++ nVals <= 0 ||
++ nVals * nBits + 7 <= 0 ||
++ rowBytes <= 0) {
+ return;
+ }
+ predLine = (Guchar *)gmalloc(rowBytes);
diff --git a/app-text/poppler/poppler-0.5.4-r2.ebuild b/app-text/poppler/poppler-0.5.4-r2.ebuild
new file mode 100644
index 000000000000..813f7c9295d7
--- /dev/null
+++ b/app-text/poppler/poppler-0.5.4-r2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/poppler/poppler-0.5.4-r2.ebuild,v 1.1 2007/08/23 19:05:59 genstef Exp $
+
+inherit libtool eutils
+
+DESCRIPTION="PDF rendering library based on the xpdf-3.0 code base"
+HOMEPAGE="http://poppler.freedesktop.org/"
+SRC_URI="http://poppler.freedesktop.org/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
+IUSE="cjk jpeg zlib"
+
+RDEPEND=">=media-libs/freetype-2.1.8
+ media-libs/fontconfig
+ cjk? ( app-text/poppler-data )
+ jpeg? ( >=media-libs/jpeg-6b )
+ !app-text/pdftohtml"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch ${FILESDIR}/004_CVE-2007-0104.patch
+ epatch ${FILESDIR}/poppler-cve-2007-3387.patch
+ elibtoolize
+}
+
+src_compile() {
+ econf \
+ --disable-poppler-qt4 \
+ --disable-poppler-glib \
+ --disable-poppler-qt \
+ --disable-gtk-test \
+ --enable-opi \
+ --disable-cairo-output \
+ --enable-xpdf-headers \
+ $(use_enable jpeg libjpeg) \
+ $(use_enable zlib) \
+ || die "configuration failed"
+ emake || die "compilation failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc README AUTHORS ChangeLog NEWS README-XPDF TODO pdf2xml.dtd
+}