summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Medinas <metalgod@gentoo.org>2005-08-10 20:38:57 +0000
committerLuis Medinas <metalgod@gentoo.org>2005-08-10 20:38:57 +0000
commit233058e675ccee8725bf7efeff279d2f5852f959 (patch)
tree9ce61c7dc11778cfed07a09826b3782f3a5dfc89 /app-text/xpdf
parent (1) Correct a few $(...) to \$(...), and (2) add some sparc-only checks to h... (diff)
downloadgentoo-2-233058e675ccee8725bf7efeff279d2f5852f959.tar.gz
gentoo-2-233058e675ccee8725bf7efeff279d2f5852f959.tar.bz2
gentoo-2-233058e675ccee8725bf7efeff279d2f5852f959.zip
Added a patch from Fedora cvs that fix security issue in bug #99769. Stable on AMD64 and x86
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'app-text/xpdf')
-rw-r--r--app-text/xpdf/ChangeLog9
-rw-r--r--app-text/xpdf/Manifest37
-rw-r--r--app-text/xpdf/files/digest-xpdf-3.00-r1012
-rw-r--r--app-text/xpdf/files/xpdf-3.00-security-can-2005-2097.patch57
-rw-r--r--app-text/xpdf/xpdf-3.00-r10.ebuild118
5 files changed, 210 insertions, 23 deletions
diff --git a/app-text/xpdf/ChangeLog b/app-text/xpdf/ChangeLog
index cccbbf5e7f63..f3c3b43b20de 100644
--- a/app-text/xpdf/ChangeLog
+++ b/app-text/xpdf/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-text/xpdf
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/xpdf/ChangeLog,v 1.82 2005/06/08 15:30:30 geoman Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/xpdf/ChangeLog,v 1.83 2005/08/10 20:38:57 metalgod Exp $
+
+*xpdf-3.00-r10 (10 Aug 2005)
+
+ 10 Aug 2005; Luis Medinas <metalgod@gentoo.org>
+ +files/xpdf-3.00-security-can-2005-2097.patch, +xpdf-3.00-r10.ebuild:
+ Added a patch from Fedora cvs that fix security issue in bug #99769. Stable
+ on AMD64 and x86
08 Jun 2005; Stephen P. Becker <geoman@gentoo.org> xpdf-3.00-r8.ebuild:
stable on mips - bug 77068
diff --git a/app-text/xpdf/Manifest b/app-text/xpdf/Manifest
index cb0cae8ebd6d..db73654224e0 100644
--- a/app-text/xpdf/Manifest
+++ b/app-text/xpdf/Manifest
@@ -1,30 +1,23 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 0e303cf49620828eff323b0251d0141c xpdf-3.00-r8.ebuild 3622
-MD5 4dfde9229c0dfade67d4d1669cf11210 xpdf-3.00-r9.ebuild 3860
MD5 ff95e23cb07d04f8a4110eb0be8ebf5e ChangeLog 9960
MD5 26b4b081d538c195dc39bcb2ec8e6f3a metadata.xml 161
+MD5 0e303cf49620828eff323b0251d0141c xpdf-3.00-r8.ebuild 3622
+MD5 4dfde9229c0dfade67d4d1669cf11210 xpdf-3.00-r9.ebuild 3860
+MD5 2aca9d038978271ef3548a1474b7768b xpdf-3.00-r10.ebuild 3917
+MD5 ec978d9450f061ea49ee697b39d545bf files/digest-xpdf-3.00-r8 767
+MD5 ec978d9450f061ea49ee697b39d545bf files/digest-xpdf-3.00-r9 767
+MD5 41c050cd5c7ccdcf1676a6852c7a35ed files/xpdf-3.00-PathScanner.patch.bz2 1003
+MD5 3df9058a9971c09627e71dad6b056244 files/xpdf-3.00-core.patch.bz2 271
MD5 8221707abac9c48b486b8c2b9bc7a7a0 files/xpdf-3.00-empty-bookmark.patch 373
-MD5 a21a0caeb7356fb3e68e5db195a505e9 files/xpdfrc.1 1587
+MD5 a0e8c344d40384d23af93a7b7a2adba7 files/xpdf-3.00-fonts.patch 399
+MD5 1ca86139c360680d756c771b7c6c8647 files/xpdf-3.00-freetype-2.1.7.patch 2743
+MD5 e07939dc8546a450c5d8aca6263ad8ee files/xpdf-3.00-gcc41.patch 890
MD5 f200f24c7cfa6061337dc6c0e03f36b9 files/xpdf-3.00-nodrm.diff 1049
+MD5 c3d50c3fb232fe51c2ae06ff1f530d49 files/xpdf-3.00-overflow.patch.bz2 2097
MD5 dd4a7f876f8002dc835dab94f7fcefc1 files/xpdf-3.00-pl2.patch 1665
-MD5 37f0b42aad269cb5896773b47b1d83ac files/xpdf-3.00-truetype-new.diff.gz 1271
MD5 ae2950dd45961a041a23aae7f740815b files/xpdf-3.00-pl3.patch 356
-MD5 1ca86139c360680d756c771b7c6c8647 files/xpdf-3.00-freetype-2.1.7.patch 2743
-MD5 a0e8c344d40384d23af93a7b7a2adba7 files/xpdf-3.00-fonts.patch 399
-MD5 3df9058a9971c09627e71dad6b056244 files/xpdf-3.00-core.patch.bz2 271
-MD5 c3d50c3fb232fe51c2ae06ff1f530d49 files/xpdf-3.00-overflow.patch.bz2 2097
-MD5 41c050cd5c7ccdcf1676a6852c7a35ed files/xpdf-3.00-PathScanner.patch.bz2 1003
MD5 9a40ac2946ebb4599602f43e10f88786 files/xpdf-3.00-scroll-opts.patch.bz2 1869
+MD5 37f0b42aad269cb5896773b47b1d83ac files/xpdf-3.00-truetype-new.diff.gz 1271
MD5 2fce5bedd61300fad1566a41f991a782 files/xpdf-goo-sizet.patch 1424
-MD5 e07939dc8546a450c5d8aca6263ad8ee files/xpdf-3.00-gcc41.patch 890
-MD5 ec978d9450f061ea49ee697b39d545bf files/digest-xpdf-3.00-r8 767
-MD5 ec978d9450f061ea49ee697b39d545bf files/digest-xpdf-3.00-r9 767
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
-
-iD8DBQFCpyMaevY57Fted3ERAuoGAJ0e9afGcetfWT8XbbbwOnrRNHEpGACfSVPh
-WQFEo1LLtLsd5xzjGp8Otas=
-=468Y
------END PGP SIGNATURE-----
+MD5 a21a0caeb7356fb3e68e5db195a505e9 files/xpdfrc.1 1587
+MD5 8aec20a56895c25a8c2c35c16211d731 files/xpdf-3.00-security-can-2005-2097.patch 1612
+MD5 ec978d9450f061ea49ee697b39d545bf files/digest-xpdf-3.00-r10 767
diff --git a/app-text/xpdf/files/digest-xpdf-3.00-r10 b/app-text/xpdf/files/digest-xpdf-3.00-r10
new file mode 100644
index 000000000000..5d4918e4839b
--- /dev/null
+++ b/app-text/xpdf/files/digest-xpdf-3.00-r10
@@ -0,0 +1,12 @@
+MD5 95294cef3031dd68e65f331e8750b2c2 xpdf-3.00.tar.gz 534697
+MD5 67f05f65bc64bf022b36138c7c26746d xpdf-arabic.tar.gz 1058
+MD5 713659f0282b9e3d169390e246e5eb74 xpdf-chinese-simplified.tar.gz 756127
+MD5 5be730b859f8b01de569eb1bad188426 xpdf-chinese-traditional.tar.gz 698902
+MD5 21f57122247e2e2a63bfed4dc4f6c199 xpdf-cyrillic.tar.gz 1286
+MD5 2240a364b9c28ce09fd8c3107784ce40 xpdf-greek.tar.gz 1124
+MD5 438dd417517641cbb78a94facf2d938e xpdf-hebrew.tar.gz 1314
+MD5 57bb9359437583479b6670e75fa06c31 xpdf-japanese.tar.gz 430478
+MD5 10cd92e4eef065a6a26341d9a2a1b5c2 xpdf-korean.tar.gz 419081
+MD5 ac19ef990cd63afd2837c10dc7e1c3ab xpdf-latin2.tar.gz 1435
+MD5 9af495766ee4eaf3411d1fa74560f0ec xpdf-thai.tar.gz 1876
+MD5 f9233880805e3d8d2cf15a4fe679f25b xpdf-turkish.tar.gz 1140
diff --git a/app-text/xpdf/files/xpdf-3.00-security-can-2005-2097.patch b/app-text/xpdf/files/xpdf-3.00-security-can-2005-2097.patch
new file mode 100644
index 000000000000..216b05abed98
--- /dev/null
+++ b/app-text/xpdf/files/xpdf-3.00-security-can-2005-2097.patch
@@ -0,0 +1,57 @@
+--- xpdf-3.00/fofi/FoFiTrueType.cc (revision 439182)
++++ xpdf-3.00/fofi/FoFiTrueType.cc (working copy)
+@@ -1343,6 +1343,27 @@
+ return;
+ }
+
++ // make sure the loca table is sane (correct length and entries are
++ // in bounds)
++ i = seekTable("loca");
++ if (tables[i].len < (nGlyphs + 1) * (locaFmt ? 4 : 2)) {
++ parsedOk = gFalse;
++ return;
++ }
++ for (j = 0; j <= nGlyphs; ++j) {
++ if (locaFmt) {
++ pos = (int)getU32BE(tables[i].offset + j*4, &parsedOk);
++ } else {
++ pos = getU16BE(tables[i].offset + j*2, &parsedOk);
++ }
++ if (pos < 0 || pos > len) {
++ parsedOk = gFalse;
++ }
++ }
++ if (!parsedOk) {
++ return;
++ }
++
+ // read the post table
+ readPostTable();
+ if (!parsedOk) {
+--- xpdf-3.00/xpdf/SplashOutputDev.cc (revision 439182)
++++ xpdf-3.00/xpdf/SplashOutputDev.cc (working copy)
+@@ -621,16 +621,19 @@
+ }
+ break;
+ case fontTrueType:
+- if (!(ff = FoFiTrueType::load(fileName->getCString()))) {
+- goto err2;
++ if ((ff = FoFiTrueType::load(fileName->getCString()))) {
++ codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
++ n = 256;
++ delete ff;
++ } else {
++ codeToGID = NULL;
++ n = 0;
+ }
+- codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
+- delete ff;
+ if (!(fontFile = fontEngine->loadTrueTypeFont(
+ id,
+ fileName->getCString(),
+ fileName == tmpFileName,
+- codeToGID, 256))) {
++ codeToGID, n))) {
+ error(-1, "Couldn't create a font for '%s'",
+ gfxFont->getName() ? gfxFont->getName()->getCString()
+ : "(unnamed)");
diff --git a/app-text/xpdf/xpdf-3.00-r10.ebuild b/app-text/xpdf/xpdf-3.00-r10.ebuild
new file mode 100644
index 000000000000..8dcdbe14afc3
--- /dev/null
+++ b/app-text/xpdf/xpdf-3.00-r10.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/xpdf/xpdf-3.00-r10.ebuild,v 1.1 2005/08/10 20:38:57 metalgod Exp $
+
+inherit eutils
+
+DESCRIPTION="An X Viewer for PDF Files"
+HOMEPAGE="http://www.foolabs.com/xpdf/"
+SRC_URI="ftp://ftp.foolabs.com/pub/xpdf/${P}.tar.gz
+ linguas_ar? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-arabic.tar.gz )
+ linguas_zh_CN? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-chinese-simplified.tar.gz )
+ linguas_zh_TW? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-chinese-traditional.tar.gz )
+ linguas_ru? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-cyrillic.tar.gz )
+ linguas_el? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-greek.tar.gz )
+ linguas_he? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-hebrew.tar.gz )
+ linguas_ja? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-japanese.tar.gz )
+ linguas_ko? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-korean.tar.gz )
+ linguas_la? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-latin2.tar.gz )
+ linguas_th? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-thai.tar.gz )
+ linguas_tr? ( ftp://ftp.foolabs.com/pub/xpdf/xpdf-turkish.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86"
+IUSE="motif nodrm truetype"
+
+DEPEND="motif? ( !s390? ( virtual/x11
+ x11-libs/openmotif ) )
+ truetype? (
+ >=media-libs/freetype-2.0.5
+ media-libs/t1lib
+ virtual/ghostscript
+ )"
+
+RDEPEND="${DEPEND}
+ linguas_ja? ( >=media-fonts/kochi-substitute-20030809-r3 )
+ linguas_zh_CN? ( >=media-fonts/arphicfonts-0.1-r2 )
+ linguas_zh_TW? ( >=media-fonts/arphicfonts-0.1-r2 )
+ linguas_ko? ( >=media-fonts/baekmuk-fonts-2.2 )
+ !app-text/xpdf-chinese-simplified
+ !app-text/xpdf-chinese-traditional
+ !app-text/xpdf-cyrillic
+ !app-text/xpdf-greek
+ !app-text/xpdf-japanese
+ !app-text/xpdf-korean
+ !app-text/xpdf-latin2
+ !app-text/xpdf-thai
+ !app-text/xpdf-turkish"
+PROVIDE="virtual/pdfviewer"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ use truetype && epatch ${FILESDIR}/xpdf-3.00-truetype-new.diff.gz
+ use truetype && epatch ${FILESDIR}/xpdf-3.00-freetype-2.1.7.patch
+ epatch ${FILESDIR}/xpdf-3.00-empty-bookmark.patch
+ epatch ${FILESDIR}/xpdf-3.00-core.patch.bz2
+ epatch ${FILESDIR}/xpdf-3.00-overflow.patch.bz2
+ epatch ${FILESDIR}/xpdf-3.00-PathScanner.patch.bz2
+ use nodrm && epatch ${FILESDIR}/xpdf-3.00-nodrm.diff
+ epatch ${FILESDIR}/xpdf-goo-sizet.patch
+ epatch ${FILESDIR}/xpdf-3.00-scroll-opts.patch.bz2
+ epatch ${FILESDIR}/xpdf-3.00-pl2.patch
+ epatch ${FILESDIR}/xpdf-3.00-pl3.patch
+ epatch ${FILESDIR}/xpdf-3.00-fonts.patch
+ epatch ${FILESDIR}/xpdf-3.00-gcc41.patch
+ epatch ${FILESDIR}/xpdf-3.00-security-can-2005-2097.patch
+ autoconf
+}
+
+src_compile() {
+ use truetype \
+ && myconf="--enable-freetype2 --with-freetype2-includes=/usr/include/freetype2" \
+ || myconf="--disable-freetype2"
+
+ econf \
+ ${myconf} \
+ --enable-opi || die
+
+ emake || die
+}
+
+src_install() {
+ make DESTDIR=${D} install || die
+ prepallman
+ dodoc README ANNOUNCE CHANGES
+ insinto /etc
+ newins ${FILESDIR}/xpdfrc.1 xpdfrc
+
+ # install languages, but not on ppc64 (produces crashes...)
+ if use !ppc64; then
+ use linguas_ar && install_lang turkish
+ use linguas_zh_CN && install_lang chinese-simplified
+ use linguas_zh_TW && install_lang chinese-traditional
+ use linguas_ru && install_lang cyrillic
+ use linguas_el && install_lang greek
+ use linguas_he && install_lang hebrew
+ use linguas_ja && install_lang japanese
+ use linguas_ko && install_lang korean
+ use linguas_la && install_lang latin2
+ use linguas_th && install_lang thai
+ use linguas_tr && install_lang turkish
+ fi
+}
+
+install_lang() {
+ cd ../xpdf-$1
+ sed 's,/usr/local/share/xpdf/,/usr/share/xpdf/,g' add-to-xpdfrc >> ${D}/etc/xpdfrc
+ insinto /usr/share/xpdf/$1
+ doins *.unicodeMap
+ doins *.cid*
+ insinto /usr/share/xpdf/$1/CMap
+ doins CMap/*
+}
+
+pkg_postinst() {
+ use motif || einfo "If you want to compile xpdf binary you have to set USE=motif"
+}