diff options
author | Daniel Gryniewicz <dang@gentoo.org> | 2005-12-06 20:47:51 +0000 |
---|---|---|
committer | Daniel Gryniewicz <dang@gentoo.org> | 2005-12-06 20:47:51 +0000 |
commit | b7edabb5b1b083e0e142122894ac577c735b41f6 (patch) | |
tree | a08889031a58995d19dbf9b8a687ba9a7d1f714e /app-text/pdftohtml | |
parent | Version bumped to fix a bug in Nvidia detection. (diff) | |
download | gentoo-2-b7edabb5b1b083e0e142122894ac577c735b41f6.tar.gz gentoo-2-b7edabb5b1b083e0e142122894ac577c735b41f6.tar.bz2 gentoo-2-b7edabb5b1b083e0e142122894ac577c735b41f6.zip |
Fix for bug #114428
(Portage version: 2.0.53)
Diffstat (limited to 'app-text/pdftohtml')
-rw-r--r-- | app-text/pdftohtml/ChangeLog | 8 | ||||
-rw-r--r-- | app-text/pdftohtml/Manifest | 15 | ||||
-rw-r--r-- | app-text/pdftohtml/files/digest-pdftohtml-0.36-r4 | 1 | ||||
-rw-r--r-- | app-text/pdftohtml/files/pdftohtml-0.36-CAN-2005-3193.patch | 95 | ||||
-rw-r--r-- | app-text/pdftohtml/pdftohtml-0.36-r4.ebuild | 38 |
5 files changed, 150 insertions, 7 deletions
diff --git a/app-text/pdftohtml/ChangeLog b/app-text/pdftohtml/ChangeLog index b3a1bfae297e..0e05e1d2ed69 100644 --- a/app-text/pdftohtml/ChangeLog +++ b/app-text/pdftohtml/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-text/pdftohtml # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/pdftohtml/ChangeLog,v 1.25 2005/10/29 14:14:46 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/pdftohtml/ChangeLog,v 1.26 2005/12/06 20:47:51 dang Exp $ + +*pdftohtml-0.36-r4 (06 Dec 2005) + + 06 Dec 2005; <dang@gentoo.org> +files/pdftohtml-0.36-CAN-2005-3193.patch, + +pdftohtml-0.36-r4.ebuild: + Fix for bug #114428 29 Oct 2005; Fabian Groffen <grobian@gentoo.org> pdftohtml-0.36-r3.ebuild: Marked ~ppc-macos (bug #109429) diff --git a/app-text/pdftohtml/Manifest b/app-text/pdftohtml/Manifest index 7c75d0223ac4..190ba4341d87 100644 --- a/app-text/pdftohtml/Manifest +++ b/app-text/pdftohtml/Manifest @@ -1,9 +1,12 @@ -MD5 c3ea476e8346bf07ac0a594403a13f63 pdftohtml-0.36-r3.ebuild 1198 MD5 ac1c85333937d396f4f75d7660f81276 ChangeLog 3190 -MD5 26b4b081d538c195dc39bcb2ec8e6f3a metadata.xml 161 -MD5 362296e34a1a04a6e5e2a7d9e97547c6 files/xpdf2-underflow.patch 2363 -MD5 c32a612ce419b9930ff273cf382558bf files/xpdf-3.00pl3-keylength.patch 346 -MD5 5d40ba9d885af84bcc917ad17e2bf8e0 files/pdftohtml-xpdf-3.00pl2-CAN-2004-1125.patch 1136 -MD5 2fce5bedd61300fad1566a41f991a782 files/xpdf-goo-sizet.patch 1424 MD5 89167430147d99e86ca445b23be50f1b files/digest-pdftohtml-0.36-r3 66 +MD5 89167430147d99e86ca445b23be50f1b files/digest-pdftohtml-0.36-r4 66 +MD5 92812f06661bb78ab112d9f8ff6c7b73 files/pdftohtml-0.36-CAN-2005-3193.patch 2644 +MD5 5d40ba9d885af84bcc917ad17e2bf8e0 files/pdftohtml-xpdf-3.00pl2-CAN-2004-1125.patch 1136 +MD5 c32a612ce419b9930ff273cf382558bf files/xpdf-3.00pl3-keylength.patch 346 MD5 87d20c86d1451638e4b7adc2f7ac8067 files/xpdf-CESA-2004-007-xpdf2-newer.diff 2718 +MD5 2fce5bedd61300fad1566a41f991a782 files/xpdf-goo-sizet.patch 1424 +MD5 362296e34a1a04a6e5e2a7d9e97547c6 files/xpdf2-underflow.patch 2363 +MD5 26b4b081d538c195dc39bcb2ec8e6f3a metadata.xml 161 +MD5 c3ea476e8346bf07ac0a594403a13f63 pdftohtml-0.36-r3.ebuild 1198 +MD5 1d99741f52db247dc1f15ea6a59663df pdftohtml-0.36-r4.ebuild 1271 diff --git a/app-text/pdftohtml/files/digest-pdftohtml-0.36-r4 b/app-text/pdftohtml/files/digest-pdftohtml-0.36-r4 new file mode 100644 index 000000000000..5ae8348e609f --- /dev/null +++ b/app-text/pdftohtml/files/digest-pdftohtml-0.36-r4 @@ -0,0 +1 @@ +MD5 75ad095bb51e1f66c9f7691e6af12f44 pdftohtml-0.36.tar.gz 300922 diff --git a/app-text/pdftohtml/files/pdftohtml-0.36-CAN-2005-3193.patch b/app-text/pdftohtml/files/pdftohtml-0.36-CAN-2005-3193.patch new file mode 100644 index 000000000000..ee0fa65e268b --- /dev/null +++ b/app-text/pdftohtml/files/pdftohtml-0.36-CAN-2005-3193.patch @@ -0,0 +1,95 @@ +diff --exclude-from=/home/dang/.diffrc -u -ruN pdftohtml-0.36.orig/xpdf/Stream.cc pdftohtml-0.36/xpdf/Stream.cc +--- pdftohtml-0.36.orig/xpdf/Stream.cc 2003-06-24 18:41:27.000000000 -0400 ++++ pdftohtml-0.36/xpdf/Stream.cc 2005-12-06 15:43:00.000000000 -0500 +@@ -404,18 +404,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() { +@@ -981,6 +996,10 @@ + FilterStream(strA) { + if (predictor != 1) { + pred = new StreamPredictor(this, predictor, columns, colors, bits); ++ if (!pred->isOk()) { ++ delete pred; ++ pred = NULL; ++ } + } else { + pred = NULL; + } +@@ -2864,6 +2883,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; +@@ -3182,6 +3209,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 pdftohtml-0.36.orig/xpdf/Stream.h pdftohtml-0.36/xpdf/Stream.h +--- pdftohtml-0.36.orig/xpdf/Stream.h 2003-06-24 18:41:27.000000000 -0400 ++++ pdftohtml-0.36/xpdf/Stream.h 2005-12-06 15:43:00.000000000 -0500 +@@ -225,6 +225,8 @@ + + ~StreamPredictor(); + ++ GBool isOk() { return ok; } ++ + int lookChar(); + int getChar(); + +@@ -242,6 +244,7 @@ + int rowBytes; // bytes per line + Guchar *predLine; // line buffer + int predIdx; // current index in predLine ++ GBool ok; + }; + + //------------------------------------------------------------------------ diff --git a/app-text/pdftohtml/pdftohtml-0.36-r4.ebuild b/app-text/pdftohtml/pdftohtml-0.36-r4.ebuild new file mode 100644 index 000000000000..a672027f1308 --- /dev/null +++ b/app-text/pdftohtml/pdftohtml-0.36-r4.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/pdftohtml/pdftohtml-0.36-r4.ebuild,v 1.1 2005/12/06 20:47:51 dang Exp $ + +inherit eutils + +DESCRIPTION="pdftohtml is a utility which converts PDF files into HTML and XML formats" +HOMEPAGE="http://pdftohtml.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc-macos ~ppc64 ~sparc ~x86" +IUSE="" +DEPEND="virtual/libc sys-devel/gcc" +RDEPEND="virtual/libc" + +src_unpack() { + unpack ${A} + EPATCH_OPTS="-d ${S}/xpdf -p0" epatch ${FILESDIR}/xpdf-CESA-2004-007-xpdf2-newer.diff + EPATCH_OPTS="-d ${S} -p1" epatch ${FILESDIR}/xpdf-goo-sizet.patch + EPATCH_OPTS="-d ${S} -p1" epatch ${FILESDIR}/xpdf2-underflow.patch + EPATCH_OPTS="-d ${S}/xpdf -p0" epatch ${FILESDIR}/pdftohtml-xpdf-3.00pl2-CAN-2004-1125.patch + EPATCH_OPTS="-d ${S}/xpdf -p0" epatch ${FILESDIR}/xpdf-3.00pl3-keylength.patch + # Fix for bug #114428 + epatch ${FILESDIR}/${P}-CAN-2005-3193.patch + + # fix location of xpdfrc + sed -i "s:/usr/local/etc/xpdfrc:/etc/xpdfrc:" aconf.h +} + +src_compile() { + emake || die +} + +src_install() { + dobin pdftohtml + dodoc AUTHORS BUGS CHANGES COPYING README pdf2xml.dtd +} |