diff options
16 files changed, 606 insertions, 19 deletions
diff --git a/app-office/koffice/ChangeLog b/app-office/koffice/ChangeLog index 6587741f970f..bfdf002329ce 100644 --- a/app-office/koffice/ChangeLog +++ b/app-office/koffice/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-office/koffice # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-office/koffice/ChangeLog,v 1.128 2005/12/03 19:43:16 carlo Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-office/koffice/ChangeLog,v 1.129 2005/12/06 01:53:48 carlo Exp $ + +*koffice-1.4.2-r3 (06 Dec 2005) +*koffice-1.4.2-r2 (06 Dec 2005) + + 06 Dec 2005; Carsten Lohrke <carlo@gentoo.org> + +files/kword-1.4.2-CAN-2005-3193.patch, -koffice-1.4.2-r1.ebuild, + +koffice-1.4.2-r2.ebuild, +koffice-1.4.2-r3.ebuild: + vulnerabilities in included xpdf code, #114429 *koffice-1.4.2-r1 (03 Dec 2005) diff --git a/app-office/koffice/Manifest b/app-office/koffice/Manifest index 0258e994a844..f394dfb1797a 100644 --- a/app-office/koffice/Manifest +++ b/app-office/koffice/Manifest @@ -1,18 +1,21 @@ -MD5 1c290237c37cc98c45f6e77db62d9781 ChangeLog 17826 +MD5 ebb0cabd91f6ebddac881fefc483ac13 ChangeLog 18112 MD5 6ee3768e50296eb2a8158093ee518133 files/CAN-2005-0064.patch 829 MD5 12452317cab5461eb911114062f2cce2 files/digest-koffice-1.3.5-r2 68 MD5 fcd72b8c0a0e8d1e8bbf6b76ed92c5cc files/digest-koffice-1.3.5-r3 144 MD5 79e9d059a9a700c3c8009978d0aa0ce3 files/digest-koffice-1.4.1 68 MD5 59512f920182567b8e9420e5e3d1bc9b files/digest-koffice-1.4.1-r1 144 MD5 cf5b314fdf4094ea845edfddf2cf39b5 files/digest-koffice-1.4.2 68 -MD5 cf5b314fdf4094ea845edfddf2cf39b5 files/digest-koffice-1.4.2-r1 68 +MD5 cf5b314fdf4094ea845edfddf2cf39b5 files/digest-koffice-1.4.2-r2 68 +MD5 cf5b314fdf4094ea845edfddf2cf39b5 files/digest-koffice-1.4.2-r3 68 MD5 5f3683b6817935e4f6269bd64398c479 files/kexi-1.4.2-gcc41.patch 1094 MD5 77399be6733ffca4ed1142ab319c1453 files/koffice_1_3_xpdf_buffer_overflow.diff 1808 MD5 f1f58cce115f40fcba31a4976b61d260 files/kspread-1.4.2-gcc41.patch 451 +MD5 fc99a43dc841dc1e656d67266b720f71 files/kword-1.4.2-CAN-2005-3193.patch 2454 MD5 bdcb79a8db04904d6e6c7110e0ff3ec9 koffice-1.3.5-r2.ebuild 1211 MD5 9242394dfa6049940585a4d3fa962907 koffice-1.3.5-r3.ebuild 1289 MD5 3dd6867f27cde022182ed16a091cb0c0 koffice-1.4.1-r1.ebuild 1747 MD5 216a4ec901dca4c7e574aae8a09c40da koffice-1.4.1.ebuild 1538 -MD5 1bf77ce6bf33c783c875fdb9ac852811 koffice-1.4.2-r1.ebuild 1645 +MD5 1e634bef5a1c1e656dfe3030988215f2 koffice-1.4.2-r2.ebuild 1502 +MD5 a858bec04ae0d1e2257af0cdd2ad948d koffice-1.4.2-r3.ebuild 1693 MD5 57795f4f39bb45ba42f8ec112ab278de koffice-1.4.2.ebuild 1545 MD5 02039d51ca4a42817775fd436dfaa956 metadata.xml 157 diff --git a/app-office/koffice/files/digest-koffice-1.4.2-r1 b/app-office/koffice/files/digest-koffice-1.4.2-r2 index a054824ae545..a054824ae545 100644 --- a/app-office/koffice/files/digest-koffice-1.4.2-r1 +++ b/app-office/koffice/files/digest-koffice-1.4.2-r2 diff --git a/app-office/koffice/files/digest-koffice-1.4.2-r3 b/app-office/koffice/files/digest-koffice-1.4.2-r3 new file mode 100644 index 000000000000..a054824ae545 --- /dev/null +++ b/app-office/koffice/files/digest-koffice-1.4.2-r3 @@ -0,0 +1 @@ +MD5 6b456fb7d54c84b11396b27a96ae0cf8 koffice-1.4.2.tar.bz2 19486852 diff --git a/app-office/koffice/files/kword-1.4.2-CAN-2005-3193.patch b/app-office/koffice/files/kword-1.4.2-CAN-2005-3193.patch new file mode 100644 index 000000000000..323cdf520b6f --- /dev/null +++ b/app-office/koffice/files/kword-1.4.2-CAN-2005-3193.patch @@ -0,0 +1,93 @@ +--- filters/kword/pdf/xpdf/xpdf/Stream.h.orig 2005-12-04 18:21:42.000000000 +0100 ++++ filters/kword/pdf/xpdf/xpdf/Stream.h 2005-12-04 18:25:55.000000000 +0100 +@@ -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; + }; + + //------------------------------------------------------------------------ +--- filters/kword/pdf/xpdf/xpdf/Stream.cc.orig 2005-12-04 18:21:29.000000000 +0100 ++++ filters/kword/pdf/xpdf/xpdf/Stream.cc 2005-12-04 18:33:51.000000000 +0100 +@@ -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() { +@@ -982,6 +997,10 @@ + FilterStream(strA) { + if (predictor != 1) { + pred = new StreamPredictor(this, predictor, columns, colors, bits); ++ if (!pred->isOk()) { ++ delete pred; ++ pred = NULL; ++ } + } else { + pred = NULL; + } +@@ -2887,6 +2906,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; +@@ -3179,6 +3206,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 --git a/app-office/koffice/koffice-1.4.2-r1.ebuild b/app-office/koffice/koffice-1.4.2-r2.ebuild index ca4d8d7ff46f..13032f8909eb 100644 --- a/app-office/koffice/koffice-1.4.2-r1.ebuild +++ b/app-office/koffice/koffice-1.4.2-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-office/koffice/koffice-1.4.2-r1.ebuild,v 1.1 2005/12/03 19:43:17 carlo Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-office/koffice/koffice-1.4.2-r2.ebuild,v 1.1 2005/12/06 01:53:48 carlo Exp $ inherit kde @@ -26,7 +26,7 @@ RDEPEND=">=media-gfx/imagemagick-5.5.2 dev-lang/python >=media-libs/lcms-1.12 javascript? ( kde-base/kjsembed ) - >=app-text/libwpd-0.8.2" + !dev-db/kexi" DEPEND="${RDEPEND} doc? ( app-doc/doxygen ) @@ -44,7 +44,7 @@ need-kde 3.3 # the dependency on python is needed for scripting support in kexi # and for kivio/kiviopart/kiviosdk. -PATCHES="${FILESDIR}/kspread-1.4.2-gcc41.patch ${FILESDIR}/kexi-1.4.2-gcc41.patch" +PATCHES="${FILESDIR}/kword-1.4.2-CAN-2005-3193.patch" src_compile() { local myconf="$(use_enable mysql) $(use_enable postgres pgsql)" diff --git a/app-office/koffice/koffice-1.4.2-r3.ebuild b/app-office/koffice/koffice-1.4.2-r3.ebuild new file mode 100644 index 000000000000..b4496d095fca --- /dev/null +++ b/app-office/koffice/koffice-1.4.2-r3.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-office/koffice/koffice-1.4.2-r3.ebuild,v 1.1 2005/12/06 01:53:48 carlo Exp $ + +inherit kde + +DESCRIPTION="An integrated office suite for KDE, the K Desktop Environment." +HOMEPAGE="http://www.koffice.org/" +SRC_URI="mirror://kde/stable/koffice-${PV}/src/${P}.tar.bz2" +LICENSE="GPL-2 LGPL-2" + +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="doc javascript mysql postgres" + +RDEPEND=">=media-gfx/imagemagick-5.5.2 + >=app-text/wv2-0.1.9 + >=media-libs/freetype-2 + media-libs/fontconfig + media-libs/libart_lgpl + dev-libs/libxml2 + dev-libs/libxslt + sys-libs/readline + mysql? ( dev-db/mysql ) + postgres? ( dev-libs/libpqxx ) + dev-lang/python + >=media-libs/lcms-1.12 + javascript? ( kde-base/kjsembed ) + >=app-text/libwpd-0.8.2" + +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + dev-util/pkgconfig" + +# add blockers on split packages derived from this one +for x in $(get-child-packages ${CATEGORY}/${PN}); do + DEPEND="${DEPEND} !${x}" + RDEPEND="${RDEPEND} !${x}" +done + +need-kde 3.3 + +# TODO: kword sql plugin needs Qt compiled with sql support +# the dependency on python is needed for scripting support in kexi +# and for kivio/kiviopart/kiviosdk. + +PATCHES="${FILESDIR}/kspread-1.4.2-gcc41.patch + ${FILESDIR}/kexi-1.4.2-gcc41.patch + ${FILESDIR}/kword-1.4.2-CAN-2005-3193.patch" + +src_compile() { + local myconf="$(use_enable mysql) $(use_enable postgres pgsql)" + + kde_src_compile + if use doc; then + make apidox || die + fi +} + +src_install() { + kde_src_install + if use doc; then + make DESTDIR="${D}" install-apidox || die + fi + + dodoc changes-* +} diff --git a/kde-base/kdegraphics/ChangeLog b/kde-base/kdegraphics/ChangeLog index 8fc8476d378b..dc3b8a8f32a3 100644 --- a/kde-base/kdegraphics/ChangeLog +++ b/kde-base/kdegraphics/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for kde-base/kdegraphics # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kdegraphics/ChangeLog,v 1.198 2005/11/29 14:07:24 greg_g Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdegraphics/ChangeLog,v 1.199 2005/12/06 01:49:27 carlo Exp $ + +*kdegraphics-3.5.0-r1 (06 Dec 2005) +*kdegraphics-3.4.3-r1 (06 Dec 2005) + + 06 Dec 2005; Carsten Lohrke <carlo@gentoo.org> + +files/kpdf-3.4.3-CAN-2005-3193.patch, + +files/kpdf-3.5.0-CAN-2005-3193.patch, + +files/kpdf-3.5.0-splitter-io.patch, +kdegraphics-3.4.3-r1.ebuild, + +kdegraphics-3.5.0-r1.ebuild: + vulnerabilities in included xpdf code, #114429 29 Nov 2005; Gregorio Guidi <greg_g@gentoo.org> kdegraphics-3.5.0.ebuild: Add checks for bug #113176 and bug #112848. diff --git a/kde-base/kdegraphics/Manifest b/kde-base/kdegraphics/Manifest index 5f902fd0cf94..798343a5f619 100644 --- a/kde-base/kdegraphics/Manifest +++ b/kde-base/kdegraphics/Manifest @@ -1,31 +1,28 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 53e11c0f06c79357d7005f6be43b70a9 ChangeLog 27664 +MD5 a51de8351b4f68ad57d319d76c1b58b5 ChangeLog 28019 MD5 284f518172a2843428d308d2d48bbbee files/CAN-2005-0064.patch 793 MD5 9eb12845ce85cc31e216d463877cb519 files/digest-kdegraphics-3.3.2-r3 71 MD5 1a6dde4414b4ad894e4ed7ed3fa919ff files/digest-kdegraphics-3.4.1-r1 71 MD5 a603b1f40c870db682665f57f908df0e files/digest-kdegraphics-3.4.2-r2 71 MD5 ad9f9a5920cdd067ae76d39d768fce5f files/digest-kdegraphics-3.4.3 71 +MD5 ad9f9a5920cdd067ae76d39d768fce5f files/digest-kdegraphics-3.4.3-r1 71 MD5 0459ac16349d79da6246392e2454796b files/digest-kdegraphics-3.5.0 71 +MD5 0459ac16349d79da6246392e2454796b files/digest-kdegraphics-3.5.0-r1 71 MD5 72b0e0cd29559b5ac4a20829a3da892c files/kdegraphics-3.4-configure.patch 847 MD5 c52515e268cbff75a6f7b7d1ee1fad47 files/kdegraphics-3.4-gcc4.patch 1226 MD5 0abb98c262645006a4b116c0635edb49 files/kdegraphics-3.4.1-gocr.patch 454 MD5 653bd55a1e87c51731d0b0512051774e files/kdegraphics-3.4.2-kpdf-contentcrash.patch 749 MD5 4caddebea4d845abb2de6dbbfe1b979a files/kdegraphics-3.4.2-kpdf-fix.patch 1024 +MD5 a4a2359edd7af28474916f12f99871fb files/kpdf-3.4.3-CAN-2005-3193.patch 3455 +MD5 fb8e3783bd62a0ef7979c10fb6046201 files/kpdf-3.5.0-CAN-2005-3193.patch 3384 +MD5 d18efc8eb0bf3e3b54a33cf04cdba3fd files/kpdf-3.5.0-splitter-io.patch 1415 MD5 4a4bcdcb2456ab92b7846b6646da1bcb files/post-3.3.1-kdegraphics-4.diff 1797 MD5 bf6b28780e0f5ea8f99e0777187e73cb files/post-3.3.2-kdegraphics.diff 1385 MD5 ec3b95efe9139f4259d6de213fe4b87b files/post-3.4.1-kdegraphics-4.diff 1827 MD5 8752f936f226c4117006b64736b21b05 kdegraphics-3.3.2-r3.ebuild 1612 MD5 511facb4e5557ab04a88092e393860db kdegraphics-3.4.1-r1.ebuild 1456 MD5 f8b2b24be0e28925e87267accd66968a kdegraphics-3.4.2-r2.ebuild 2089 +MD5 ff250b39a79ce430b6ff795de81e37fa kdegraphics-3.4.3-r1.ebuild 1681 MD5 f31268d787d150bd1810a8df5fc46735 kdegraphics-3.4.3.ebuild 1731 +MD5 5b949c25ee99a8ca82619447ff421322 kdegraphics-3.5.0-r1.ebuild 1965 MD5 71a6e1d836d6cce0d6a9ce6a71863200 kdegraphics-3.5.0.ebuild 1870 MD5 acc03a4b12bb0433a57e95bd253b9501 metadata.xml 156 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2 (GNU/Linux) - -iD8DBQFDk35qgIKl8Uu19MoRAn/UAJ0b7kO2+X/8OxUldy+7xVEpFCBgtACeMOqW -31/Hl5T/segtcLL/O7M+FQs= -=ZkOI ------END PGP SIGNATURE----- diff --git a/kde-base/kdegraphics/files/digest-kdegraphics-3.4.3-r1 b/kde-base/kdegraphics/files/digest-kdegraphics-3.4.3-r1 new file mode 100644 index 000000000000..2cb888ba9f29 --- /dev/null +++ b/kde-base/kdegraphics/files/digest-kdegraphics-3.4.3-r1 @@ -0,0 +1 @@ +MD5 e2b2926301204a0f587d9e6e163c06d9 kdegraphics-3.4.3.tar.bz2 6554272 diff --git a/kde-base/kdegraphics/files/digest-kdegraphics-3.5.0-r1 b/kde-base/kdegraphics/files/digest-kdegraphics-3.5.0-r1 new file mode 100644 index 000000000000..44e671a5ef99 --- /dev/null +++ b/kde-base/kdegraphics/files/digest-kdegraphics-3.5.0-r1 @@ -0,0 +1 @@ +MD5 389a00d4387e621d4dd325a59c7657c4 kdegraphics-3.5.0.tar.bz2 7094349 diff --git a/kde-base/kdegraphics/files/kpdf-3.4.3-CAN-2005-3193.patch b/kde-base/kdegraphics/files/kpdf-3.4.3-CAN-2005-3193.patch new file mode 100644 index 000000000000..0999fe01cd4e --- /dev/null +++ b/kde-base/kdegraphics/files/kpdf-3.4.3-CAN-2005-3193.patch @@ -0,0 +1,119 @@ +--- kpdf/xpdf/xpdf/JPXStream.cc.orig 2005-12-04 13:01:07.000000000 +0100 ++++ kpdf/xpdf/xpdf/JPXStream.cc 2005-12-04 13:15:44.000000000 +0100 +@@ -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,6 +701,13 @@ + / img.xTileSize; + img.nYTiles = (img.ySize - img.yTileOffset + img.yTileSize - 1) + / img.yTileSize; ++ 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)); + img.tiles = (JPXTile *)gmalloc(img.nXTiles * img.nYTiles * + sizeof(JPXTile)); + for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { +--- kpdf/xpdf/xpdf/Stream.h.orig 2005-12-04 13:16:13.000000000 +0100 ++++ kpdf/xpdf/xpdf/Stream.h 2005-12-04 13:21:52.000000000 +0100 +@@ -233,6 +233,8 @@ + + ~StreamPredictor(); + ++ GBool isOk() { return ok; } ++ + int lookChar(); + int getChar(); + +@@ -250,6 +252,7 @@ + int rowBytes; // bytes per line + Guchar *predLine; // line buffer + int predIdx; // current index in predLine ++ GBool ok; + }; + + //------------------------------------------------------------------------ +--- kpdf/xpdf/xpdf/Stream.cc.orig 2005-12-04 13:23:51.000000000 +0100 ++++ kpdf/xpdf/xpdf/Stream.cc 2005-12-04 13:36:34.000000000 +0100 +@@ -408,18 +408,34 @@ + + 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() { +@@ -1013,6 +1029,10 @@ + FilterStream(strA) { + if (predictor != 1) { + pred = new StreamPredictor(this, predictor, columns, colors, bits); ++ if (!pred->isOk()) { ++ delete pred; ++ pred = NULL; ++ } + } else { + pred = NULL; + } +@@ -2899,6 +2919,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; +@@ -3258,6 +3286,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 --git a/kde-base/kdegraphics/files/kpdf-3.5.0-CAN-2005-3193.patch b/kde-base/kdegraphics/files/kpdf-3.5.0-CAN-2005-3193.patch new file mode 100644 index 000000000000..f171b12cf5ce --- /dev/null +++ b/kde-base/kdegraphics/files/kpdf-3.5.0-CAN-2005-3193.patch @@ -0,0 +1,118 @@ +--- kpdf/xpdf/xpdf/JPXStream.cc 2005/12/01 22:32:29 484786 ++++ kpdf/xpdf/xpdf/JPXStream.cc 2005/12/01 22:34:41 484787 +@@ -783,7 +783,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; +@@ -818,6 +818,13 @@ + / img.xTileSize; + img.nYTiles = (img.ySize - img.yTileOffset + img.yTileSize - 1) + / img.yTileSize; ++ 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 *)gmallocn(nTiles, sizeof(JPXTile)); + img.tiles = (JPXTile *)gmallocn(img.nXTiles * img.nYTiles, + sizeof(JPXTile)); + for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { +--- kpdf/xpdf/xpdf/Stream.h 2005/12/01 22:32:29 484786 ++++ kpdf/xpdf/xpdf/Stream.h 2005/12/01 22:34:41 484787 +@@ -232,6 +232,8 @@ + + ~StreamPredictor(); + ++ GBool isOk() { return ok; } ++ + int lookChar(); + int getChar(); + +@@ -249,6 +251,7 @@ + int rowBytes; // bytes per line + Guchar *predLine; // line buffer + int predIdx; // current index in predLine ++ GBool ok; + }; + + //------------------------------------------------------------------------ +--- kpdf/xpdf/xpdf/Stream.cc 2005/12/01 22:32:29 484786 ++++ kpdf/xpdf/xpdf/Stream.cc 2005/12/01 22:34:41 484787 +@@ -403,18 +403,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() { +@@ -1006,6 +1021,10 @@ + FilterStream(strA) { + if (predictor != 1) { + pred = new StreamPredictor(this, predictor, columns, colors, bits); ++ if (!pred->isOk()) { ++ delete pred; ++ pred = NULL; ++ } + } else { + pred = NULL; + } +@@ -2903,6 +2922,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; +@@ -3833,6 +3860,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 --git a/kde-base/kdegraphics/files/kpdf-3.5.0-splitter-io.patch b/kde-base/kdegraphics/files/kpdf-3.5.0-splitter-io.patch new file mode 100644 index 000000000000..82e4311bba5c --- /dev/null +++ b/kde-base/kdegraphics/files/kpdf-3.5.0-splitter-io.patch @@ -0,0 +1,38 @@ +Index: kpdf/part.cpp +=================================================================== +--- kpdf/part.cpp (revision 485446) ++++ kpdf/part.cpp (revision 485447) +@@ -274,6 +274,8 @@ + connect( m_watcher, SIGNAL( dirty( const QString& ) ), this, SLOT( slotFileDirty( const QString& ) ) ); + m_dirtyHandler = new QTimer( this ); + connect( m_dirtyHandler, SIGNAL( timeout() ),this, SLOT( slotDoFileDirty() ) ); ++ m_saveSplitterSizeTimer = new QTimer( this ); ++ connect( m_saveSplitterSizeTimer, SIGNAL( timeout() ),this, SLOT( saveSplitterSize() ) ); + + slotNewConfig(); + +@@ -478,7 +480,7 @@ + { + // if pageView has been resized, save splitter sizes + if ( watched == m_pageView && e->type() == QEvent::Resize ) +- saveSplitterSize(); ++ m_saveSplitterSizeTimer->start(500, true); + + // only intercept events, don't block them + return false; +Index: kpdf/part.h +=================================================================== +--- kpdf/part.h (revision 485446) ++++ kpdf/part.h (revision 485447) +@@ -146,6 +146,11 @@ + // static instances counter + static unsigned int m_count; + ++ // this is a hack because we can not use writeConfig on part destructor ++ // and we don't want to writeconfig every time someone moves the splitter ++ // so we use a QTimer each 500 ms ++ QTimer *m_saveSplitterSizeTimer; ++ + KDirWatch *m_watcher; + QTimer *m_dirtyHandler; + DocumentViewport m_viewportDirty; diff --git a/kde-base/kdegraphics/kdegraphics-3.4.3-r1.ebuild b/kde-base/kdegraphics/kdegraphics-3.4.3-r1.ebuild new file mode 100644 index 000000000000..695a2d0fdbc7 --- /dev/null +++ b/kde-base/kdegraphics/kdegraphics-3.4.3-r1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdegraphics/kdegraphics-3.4.3-r1.ebuild,v 1.1 2005/12/06 01:49:27 carlo Exp $ + +inherit kde-dist eutils + +DESCRIPTION="KDE graphics-related apps" + +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~sparc ~x86" +IUSE="gphoto2 imlib nodrm openexr opengl povray scanner tetex" + +DEPEND="~kde-base/kdebase-${PV} + >=media-libs/freetype-2 + media-libs/fontconfig + gphoto2? ( media-libs/libgphoto2 ) + scanner? ( media-gfx/sane-backends ) + media-libs/libart_lgpl + media-libs/lcms + dev-libs/fribidi + imlib? ( media-libs/imlib ) + virtual/ghostscript + media-libs/tiff + openexr? ( >=media-libs/openexr-1.2 ) + povray? ( media-gfx/povray + virtual/opengl )" + +RDEPEND="${DEPEND} + app-text/xpdf + tetex? ( + || ( >=app-text/tetex-2 + app-text/ptex + app-text/cstetex + app-text/dvipdfm ) )" + +DEPEND="${DEPEND} + dev-util/pkgconfig" + +src_unpack() { + kde_src_unpack + + # Fix detection of gocr (kde bug 90082). + epatch "${FILESDIR}/kdegraphics-3.4.1-gocr.patch" + + # Configure patch. Applied for 3.5. + epatch "${FILESDIR}/kdegraphics-3.4-configure.patch" + + epatch "${FILESDIR}/kpdf-3.4.3-CAN-2005-3193.patch" + + # For the configure patch. + make -f admin/Makefile.common || die +} + +src_compile() { + if use gphoto2; then + myconf="${myconf} --with-kamera \ + --with-gphoto2-includes=/usr/include/gphoto2 \ + --with-gphoto2-libraries=/usr/lib/gphoto2" + else + myconf="${myconf} --without-kamera" + fi + + use scanner || export DO_NOT_COMPILE="${DO_NOT_COMPILE} kooka libkscan" + use povray || export DO_NOT_COMPILE="${DO_NOT_COMPILE} kpovmodeler" + + myconf="${myconf} $(use_with imlib) $(use_enable !nodrm kpdf-drm) + $(use_with openexr)" + + kde_src_compile +} diff --git a/kde-base/kdegraphics/kdegraphics-3.5.0-r1.ebuild b/kde-base/kdegraphics/kdegraphics-3.5.0-r1.ebuild new file mode 100644 index 000000000000..f7a9a5b89af2 --- /dev/null +++ b/kde-base/kdegraphics/kdegraphics-3.5.0-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdegraphics/kdegraphics-3.5.0-r1.ebuild,v 1.1 2005/12/06 01:49:27 carlo Exp $ + +inherit kde-dist eutils + +DESCRIPTION="KDE graphics-related apps" + +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~sparc ~x86" +IUSE="gphoto2 imlib openexr opengl pdflib povray scanner tetex" + +DEPEND="~kde-base/kdebase-${PV} + >=media-libs/freetype-2 + media-libs/fontconfig + gphoto2? ( media-libs/libgphoto2 ) + scanner? ( media-gfx/sane-backends ) + media-libs/libart_lgpl + media-libs/lcms + dev-libs/fribidi + imlib? ( media-libs/imlib ) + virtual/ghostscript + media-libs/tiff + openexr? ( >=media-libs/openexr-1.2 ) + povray? ( media-gfx/povray + virtual/opengl ) + pdflib? ( >=app-text/poppler-0.3.1 )" + +RDEPEND="${DEPEND} + tetex? ( + || ( >=app-text/tetex-2 + app-text/ptex + app-text/cstetex + app-text/dvipdfm ) )" + +DEPEND="${DEPEND} + dev-util/pkgconfig" + +PATCHES="${FILESDIR}/kpdf-3.5.0-CAN-2005-3193.patch ${FILESDIR}/kpdf-3.5.0-splitter-io.patch" + +pkg_setup() { + if ! built_with_use virtual/ghostscript X; then + eerror "This package requires virtual/ghostscript compiled with X11 support." + eerror "Please reemerge virtual/ghostscript with USE=\"X\"." + die "Please reemerge virtual/ghostscript with USE=\"X\"." + fi + if use pdflib && ! built_with_use app-text/poppler qt; then + eerror "This package requires app-text/poppler compiled with Qt support." + eerror "Please reemerge app-text/poppler with USE=\"qt\"." + die "Please reemerge app-text/poppler with USE=\"qt\"." + fi +} + +src_compile() { + local myconf="$(use_with openexr) $(use_with pdflib poppler) + $(use_with gphoto2 kamera)" + + use imlib || export DO_NOT_COMPILE="${DO_NOT_COMPILE} kuickshow" + use scanner || export DO_NOT_COMPILE="${DO_NOT_COMPILE} kooka libkscan" + use povray || export DO_NOT_COMPILE="${DO_NOT_COMPILE} kpovmodeler" + + kde_src_compile +} |