summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gryniewicz <dang@gentoo.org>2005-12-04 18:40:01 +0000
committerDaniel Gryniewicz <dang@gentoo.org>2005-12-04 18:40:01 +0000
commitb03216506414cc5b19c3ca8dad6370c1843b616b (patch)
tree3ac32c099bf7f78bba19bed48e7db5ae787f98d9
parentVersion bump (bug #113585) (diff)
downloadgentoo-2-b03216506414cc5b19c3ca8dad6370c1843b616b.tar.gz
gentoo-2-b03216506414cc5b19c3ca8dad6370c1843b616b.tar.bz2
gentoo-2-b03216506414cc5b19c3ca8dad6370c1843b616b.zip
Fix for bug #114428
(Portage version: 2.0.53_rc7)
-rw-r--r--app-text/poppler/ChangeLog8
-rw-r--r--app-text/poppler/Manifest15
-rw-r--r--app-text/poppler/files/digest-poppler-0.4.2-r11
-rw-r--r--app-text/poppler/files/poppler-0.4.2-CAN-2005-3193.patch123
-rw-r--r--app-text/poppler/poppler-0.4.2-r1.ebuild52
5 files changed, 192 insertions, 7 deletions
diff --git a/app-text/poppler/ChangeLog b/app-text/poppler/ChangeLog
index 375c94ad0c4d..36ee649e9778 100644
--- a/app-text/poppler/ChangeLog
+++ b/app-text/poppler/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-text/poppler
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/poppler/ChangeLog,v 1.17 2005/12/01 05:28:02 tgall Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/poppler/ChangeLog,v 1.18 2005/12/04 18:40:01 dang Exp $
+
+*poppler-0.4.2-r1 (04 Dec 2005)
+
+ 04 Dec 2005; <dang@gentoo.org> +files/poppler-0.4.2-CAN-2005-3193.patch,
+ +poppler-0.4.2-r1.ebuild:
+ Fix for bug #114428
30 Nov 2005; Tom Gall <tgall@gentoo.org> poppler-0.3.0.ebuild:
stable on ppc64
diff --git a/app-text/poppler/Manifest b/app-text/poppler/Manifest
index 8b4b85983e90..670d6f802644 100644
--- a/app-text/poppler/Manifest
+++ b/app-text/poppler/Manifest
@@ -1,14 +1,17 @@
MD5 39b0c49479b6cc71be5c780fd73dc672 ChangeLog 2161
-MD5 26b4b081d538c195dc39bcb2ec8e6f3a metadata.xml 161
-MD5 6999412acc1316a8e229eada23ab192b poppler-0.3.0.ebuild 856
-MD5 0f47305adf0da4f94dc6ef03291cd175 poppler-0.3.2.ebuild 941
-MD5 d2c3a8a3ea5a2609eaf2289b3995dea4 poppler-0.3.3.ebuild 939
-MD5 d7a0327f479e0afd0bd13cd6cbf00f89 poppler-0.4.1.ebuild 1073
-MD5 0a4aeea8b99f0bde18dd89db5fc6d313 poppler-0.4.2.ebuild 1383
MD5 9fcae20e4d0c670e6f53602e516991aa files/digest-poppler-0.3.0 65
MD5 25675c998a475fcdd58b64313df002b5 files/digest-poppler-0.3.2 65
MD5 ffa0dcdb55709d044c7cefd7da512fe8 files/digest-poppler-0.3.3 65
MD5 ff3789d555c986604a49249f0df50c8a files/digest-poppler-0.4.1 65
MD5 be62fc9641cde65e89b62b2a629bb617 files/digest-poppler-0.4.2 65
+MD5 be62fc9641cde65e89b62b2a629bb617 files/digest-poppler-0.4.2-r1 65
MD5 3342aad1175b4b522f84e453999fbb05 files/poppler-0.4.1-cairo-ft.patch 470
+MD5 c6805b961ecb2a526246a39bbff57f23 files/poppler-0.4.2-CAN-2005-3193.patch 3940
MD5 569ab87015257d03b6ab6cedb4bcdbec files/poppler-gcc41.patch 1130
+MD5 26b4b081d538c195dc39bcb2ec8e6f3a metadata.xml 161
+MD5 6999412acc1316a8e229eada23ab192b poppler-0.3.0.ebuild 856
+MD5 0f47305adf0da4f94dc6ef03291cd175 poppler-0.3.2.ebuild 941
+MD5 d2c3a8a3ea5a2609eaf2289b3995dea4 poppler-0.3.3.ebuild 939
+MD5 d7a0327f479e0afd0bd13cd6cbf00f89 poppler-0.4.1.ebuild 1073
+MD5 4119fcb740855fb1d0728b2b2008d6d8 poppler-0.4.2-r1.ebuild 1428
+MD5 0a4aeea8b99f0bde18dd89db5fc6d313 poppler-0.4.2.ebuild 1383
diff --git a/app-text/poppler/files/digest-poppler-0.4.2-r1 b/app-text/poppler/files/digest-poppler-0.4.2-r1
new file mode 100644
index 000000000000..2c60c15e4850
--- /dev/null
+++ b/app-text/poppler/files/digest-poppler-0.4.2-r1
@@ -0,0 +1 @@
+MD5 beb1eea135a3c5b679a7a22d01a500c0 poppler-0.4.2.tar.gz 777935
diff --git a/app-text/poppler/files/poppler-0.4.2-CAN-2005-3193.patch b/app-text/poppler/files/poppler-0.4.2-CAN-2005-3193.patch
new file mode 100644
index 000000000000..6775f081766f
--- /dev/null
+++ b/app-text/poppler/files/poppler-0.4.2-CAN-2005-3193.patch
@@ -0,0 +1,123 @@
+diff --exclude-from=/home/dang/.diffrc -u -ruN poppler-0.4.2.orig/poppler/JPXStream.cc poppler-0.4.2/poppler/JPXStream.cc
+--- poppler-0.4.2.orig/poppler/JPXStream.cc 2005-03-03 14:46:03.000000000 -0500
++++ poppler-0.4.2/poppler/JPXStream.cc 2005-12-04 13:30:39.000000000 -0500
+@@ -666,7 +666,7 @@
+ int segType;
+ GBool haveSIZ, haveCOD, haveQCD, haveSOT;
+ Guint precinctSize, style;
+- Guint segLen, capabilities, comp, i, j, r;
++ Guint segLen, capabilities, nTiles, comp, i, j, r;
+
+ //----- main header
+ haveSIZ = haveCOD = haveQCD = haveSOT = gFalse;
+@@ -701,8 +701,13 @@
+ / img.xTileSize;
+ img.nYTiles = (img.ySize - img.yTileOffset + img.yTileSize - 1)
+ / img.yTileSize;
+- img.tiles = (JPXTile *)gmalloc(img.nXTiles * img.nYTiles *
+- sizeof(JPXTile));
++ nTiles = img.nXTiles * img.nYTiles;
++ // check for overflow before allocating memory
++ if (nTiles == 0 || nTiles / img.nXTiles != img.nYTiles) {
++ error(getPos(), "Bad tile count in JPX SIZ marker segment");
++ return gFalse;
++ }
++ img.tiles = (JPXTile *)gmalloc(nTiles * sizeof(JPXTile));
+ for (i = 0; i < img.nXTiles * img.nYTiles; ++i) {
+ img.tiles[i].tileComps = (JPXTileComp *)gmalloc(img.nComps *
+ sizeof(JPXTileComp));
+diff --exclude-from=/home/dang/.diffrc -u -ruN poppler-0.4.2.orig/poppler/Stream.cc poppler-0.4.2/poppler/Stream.cc
+--- poppler-0.4.2.orig/poppler/Stream.cc 2005-04-27 16:56:18.000000000 -0400
++++ poppler-0.4.2/poppler/Stream.cc 2005-12-04 13:22:20.000000000 -0500
+@@ -415,18 +415,33 @@
+
+ StreamPredictor::StreamPredictor(Stream *strA, int predictorA,
+ int widthA, int nCompsA, int nBitsA) {
++ int totalBits;
++
+ str = strA;
+ predictor = predictorA;
+ width = widthA;
+ nComps = nCompsA;
+ nBits = nBitsA;
++ predLine = NULL;
++ ok = gFalse;
+
+ nVals = width * nComps;
++ totalBits = nVals * nBits;
++ if (totalBits == 0 ||
++ (totalBits / nBits) / nComps != width ||
++ totalBits + 7 < 0) {
++ return;
++ }
+ pixBytes = (nComps * nBits + 7) >> 3;
+- rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes;
++ rowBytes = ((totalBits + 7) >> 3) + pixBytes;
++ if (rowBytes < 0) {
++ return;
++ }
+ predLine = (Guchar *)gmalloc(rowBytes);
+ memset(predLine, 0, rowBytes);
+ predIdx = rowBytes;
++
++ ok = gTrue;
+ }
+
+ StreamPredictor::~StreamPredictor() {
+@@ -1020,6 +1035,10 @@
+ FilterStream(strA) {
+ if (predictor != 1) {
+ pred = new StreamPredictor(this, predictor, columns, colors, bits);
++ if (!pred->isOk()) {
++ delete pred;
++ pred = NULL;
++ }
+ } else {
+ pred = NULL;
+ }
+@@ -2907,6 +2926,14 @@
+ height = read16();
+ width = read16();
+ numComps = str->getChar();
++ if (numComps <= 0 || numComps > 4) {
++ error(getPos(), "Bad number of components in DCT stream", prec);
++ return gFalse;
++ }
++ if (numComps <= 0 || numComps > 4) {
++ error(getPos(), "Bad number of components in DCT stream", prec);
++ return gFalse;
++ }
+ if (prec != 8) {
+ error(getPos(), "Bad DCT precision %d", prec);
+ return gFalse;
+@@ -3268,6 +3295,10 @@
+ FilterStream(strA) {
+ if (predictor != 1) {
+ pred = new StreamPredictor(this, predictor, columns, colors, bits);
++ if (!pred->isOk()) {
++ delete pred;
++ pred = NULL;
++ }
+ } else {
+ pred = NULL;
+ }
+diff --exclude-from=/home/dang/.diffrc -u -ruN poppler-0.4.2.orig/poppler/Stream.h poppler-0.4.2/poppler/Stream.h
+--- poppler-0.4.2.orig/poppler/Stream.h 2005-04-27 16:56:18.000000000 -0400
++++ poppler-0.4.2/poppler/Stream.h 2005-12-04 13:22:20.000000000 -0500
+@@ -231,6 +231,8 @@
+
+ ~StreamPredictor();
+
++ GBool isOk() { return ok; }
++
+ int lookChar();
+ int getChar();
+
+@@ -248,6 +250,7 @@
+ int rowBytes; // bytes per line
+ Guchar *predLine; // line buffer
+ int predIdx; // current index in predLine
++ GBool ok;
+ };
+
+ //------------------------------------------------------------------------
diff --git a/app-text/poppler/poppler-0.4.2-r1.ebuild b/app-text/poppler/poppler-0.4.2-r1.ebuild
new file mode 100644
index 000000000000..96fc3f796337
--- /dev/null
+++ b/app-text/poppler/poppler-0.4.2-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/poppler/poppler-0.4.2-r1.ebuild,v 1.1 2005/12/04 18:40:01 dang Exp $
+
+inherit eutils autotools
+
+DESCRIPTION="Poppler is a 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 ~ppc ~ppc64 ~sparc ~x86 ~mips"
+IUSE="gtk jpeg qt zlib cairo"
+
+RDEPEND=">=media-libs/freetype-2.1.8
+ media-libs/fontconfig
+ virtual/ghostscript
+ cairo? ( >=x11-libs/cairo-0.5 )
+ gtk? ( >=x11-libs/gtk+-2.4 )
+ qt? ( =x11-libs/qt-3* )
+ jpeg? ( >=media-libs/jpeg-6b )
+ zlib? ( sys-libs/zlib )"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ >=sys-devel/automake-1.9.6"
+
+src_unpack(){
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/poppler-0.4.1-cairo-ft.patch
+ epatch ${FILESDIR}/poppler-gcc41.patch
+ epatch ${FILESDIR}/${P}-CAN-2005-3193.patch
+ eautoreconf
+}
+
+src_compile() {
+ econf --disable-poppler-qt4 --enable-opi \
+ $(use_enable cairo cairo-output) \
+ $(use_enable jpeg libjpeg) \
+ $(use_enable zlib) \
+ $(use_enable gtk poppler-glib) \
+ $(use_enable qt poppler-qt) \
+ || die "configuration failed"
+ emake || die "compilation failed"
+}
+
+src_install() {
+ make DESTDIR=${D} install || die
+ dodoc README AUTHORS ChangeLog NEWS README-XPDF TODO
+}