pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/misc/koffice updated xpdf patch.
details: https://anonhg.NetBSD.org/pkgsrc/rev/947844decb83
branches: trunk
changeset: 505594:947844decb83
user: markd <markd%pkgsrc.org@localhost>
date: Thu Jan 05 10:28:27 2006 +0000
description:
updated xpdf patch.
http://www.kde.org/info/security/advisory-20051207-2.txt
Bump PKGREVISION.
diffstat:
misc/koffice/Makefile | 7 +-
misc/koffice/distinfo | 8 +-
misc/koffice/patches/patch-an | 105 +++++++++++++++++++++++++++++++
misc/koffice/patches/patch-ao | 139 ++++++++++++++++++++++++++++++++++++++++++
misc/koffice/patches/patch-ap | 22 ++++++
5 files changed, 272 insertions(+), 9 deletions(-)
diffs (truncated from 323 to 300 lines):
diff -r ff8f002977c9 -r 947844decb83 misc/koffice/Makefile
--- a/misc/koffice/Makefile Thu Jan 05 10:20:43 2006 +0000
+++ b/misc/koffice/Makefile Thu Jan 05 10:28:27 2006 +0000
@@ -1,16 +1,13 @@
-# $NetBSD: Makefile,v 1.70 2005/12/31 12:32:39 wiz Exp $
+# $NetBSD: Makefile,v 1.71 2006/01/05 10:28:27 markd Exp $
DISTNAME= koffice-1.4.2
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= misc kde
MASTER_SITES= ftp://ftp.kde.org/pub/kde/stable/koffice-1.4.2/src/ \
ftp://ftp.us.kde.org/pub/kde/stable/koffice-1.4.2/src/ \
ftp://ftp.de.kde.org/pub/kde/stable/koffice-1.4.2/src/
EXTRACT_SUFX= .tar.bz2
-PATCH_SITES= ftp://ftp.kde.org/pub/kde/security_patches/
-PATCHFILES= post-1.3-koffice-CAN-2005-3193.diff
-
MAINTAINER= markd%NetBSD.org@localhost
HOMEPAGE= http://www.koffice.org/
COMMENT= KDE Office Suite
diff -r ff8f002977c9 -r 947844decb83 misc/koffice/distinfo
--- a/misc/koffice/distinfo Thu Jan 05 10:20:43 2006 +0000
+++ b/misc/koffice/distinfo Thu Jan 05 10:28:27 2006 +0000
@@ -1,11 +1,8 @@
-$NetBSD: distinfo,v 1.27 2005/12/08 10:52:42 markd Exp $
+$NetBSD: distinfo,v 1.28 2006/01/05 10:28:27 markd Exp $
SHA1 (koffice-1.4.2.tar.bz2) = 474ab6d289ff1330c200768b30a3dbe271cd26c5
RMD160 (koffice-1.4.2.tar.bz2) = 117d5c50aa81d669002005f39fc03bc3f999b62c
Size (koffice-1.4.2.tar.bz2) = 19486852 bytes
-SHA1 (post-1.3-koffice-CAN-2005-3193.diff) = d93fbdd5ea1c88811adb4b9f344d0699a37dfb11
-RMD160 (post-1.3-koffice-CAN-2005-3193.diff) = e65389c7e6789b4224be3c573ae72aba27508fb4
-Size (post-1.3-koffice-CAN-2005-3193.diff) = 2612 bytes
SHA1 (patch-ab) = 6f253484f6c09877cca6b1d1d7610725c895e13a
SHA1 (patch-af) = e93b6e78c1965b9882778ae5afc1404627ce51e8
SHA1 (patch-ag) = 2b73421e1ade6592e56aeb389f17397a5a4b85f2
@@ -15,3 +12,6 @@
SHA1 (patch-ak) = f077c819a33c642f30d6b2a00d581b911f3bbec9
SHA1 (patch-al) = a12d042c1326e71d4616f86f4b1255c4e2ff2ea2
SHA1 (patch-am) = 7b23a60d7bac76421d5ec14279b3ab454af2165d
+SHA1 (patch-an) = c12e80acc30399bf95b668f64b74186624016956
+SHA1 (patch-ao) = c75c00cc380c2249cfaa399151f8ccf3625612f4
+SHA1 (patch-ap) = 5ed9f3fed39dec6852f987cd3d5071ed20914cd9
diff -r ff8f002977c9 -r 947844decb83 misc/koffice/patches/patch-an
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/koffice/patches/patch-an Thu Jan 05 10:28:27 2006 +0000
@@ -0,0 +1,105 @@
+$NetBSD: patch-an,v 1.3 2006/01/05 10:28:27 markd Exp $
+
+Index: filters/kword/pdf/xpdf/xpdf/JBIG2Stream.cc
+===================================================================
+--- filters/kword/pdf/xpdf/xpdf/JBIG2Stream.cc (revision 409205)
++++ filters/kword/pdf/xpdf/xpdf/JBIG2Stream.cc (revision 488720)
+@@ -7,6 +7,7 @@
+ //========================================================================
+
+ #include <aconf.h>
++#include <limits.h>
+
+ #ifdef USE_GCC_PRAGMAS
+ #pragma implementation
+@@ -977,7 +978,15 @@ JBIG2Bitmap::JBIG2Bitmap(Guint segNumA,
+ w = wA;
+ h = hA;
+ line = (wA + 7) >> 3;
+- data = (Guchar *)gmalloc(h * line);
++
++ if (h < 0 || line <= 0 || h >= (INT_MAX - 1)/ line) {
++ error(-1, "invalid width/height");
++ data = NULL;
++ return;
++ }
++
++ // need to allocate one extra guard byte for use in combine()
++ data = (Guchar *)gmalloc(h * line + 1);
+ }
+
+ JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, JBIG2Bitmap *bitmap):
+@@ -986,7 +995,15 @@ JBIG2Bitmap::JBIG2Bitmap(Guint segNumA,
+ w = bitmap->w;
+ h = bitmap->h;
+ line = bitmap->line;
+- data = (Guchar *)gmalloc(h * line);
++
++ if (h < 0 || line <= 0 || h >= (INT_MAX - 1) / line) {
++ error(-1, "invalid width/height");
++ data = NULL;
++ return;
++ }
++
++ // need to allocate one extra guard byte for use in combine()
++ data = (Guchar *)gmalloc(h * line + 1);
+ memcpy(data, bitmap->data, h * line);
+ }
+
+@@ -1012,10 +1029,14 @@ JBIG2Bitmap *JBIG2Bitmap::getSlice(Guint
+ }
+
+ void JBIG2Bitmap::expand(int newH, Guint pixel) {
+- if (newH <= h) {
++ if (newH <= h || line <= 0 || newH >= (INT_MAX-1) / line) {
++ error(-1, "invalid width/height");
++ gfree(data);
++ data = NULL;
+ return;
+ }
+- data = (Guchar *)grealloc(data, newH * line);
++ /* need to allocate one extra guard byte for use in combine() */
++ data = (Guchar *)grealloc(data, newH * line + 1);
+ if (pixel) {
+ memset(data + h * line, 0xff, (newH - h) * line);
+ } else {
+@@ -2239,6 +2260,11 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion
+
+ strips = 1 << logStrips;
+
++ if (w < 0 || h <= 0 || w >= INT_MAX / h) {
++ error(-1, "invalid width/height");
++ return NULL;
++ }
++
+ // allocate the bitmap
+ bitmap = new JBIG2Bitmap(0, w, h);
+ if (defPixel) {
+@@ -2505,6 +2531,15 @@ void JBIG2Stream::readHalftoneRegionSeg(
+ error(getPos(), "Bad symbol dictionary reference in JBIG2 halftone segment");
+ return;
+ }
++ if (gridH == 0 || gridW >= INT_MAX / gridH) {
++ error(getPos(), "Bad size in JBIG2 halftone segment");
++ return;
++ }
++ if (w == 0 || h >= INT_MAX / w) {
++ error(getPos(), "Bad size in JBIG2 bitmap segment");
++ return;
++ }
++
+ patternDict = (JBIG2PatternDict *)seg;
+ bpp = 0;
+ i = 1;
+@@ -3078,6 +3113,11 @@ JBIG2Bitmap *JBIG2Stream::readGenericRef
+ Guint ltpCX, cx, cx0, cx2, cx3, cx4, tpgrCX0, tpgrCX1, tpgrCX2;
+ int x, y, pix;
+
++ if (w < 0 || h <= 0 || w >= INT_MAX / h) {
++ error(-1, "invalid width/height");
++ return NULL;
++ }
++
+ bitmap = new JBIG2Bitmap(0, w, h);
+ bitmap->clearToZero();
+
diff -r ff8f002977c9 -r 947844decb83 misc/koffice/patches/patch-ao
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/koffice/patches/patch-ao Thu Jan 05 10:28:27 2006 +0000
@@ -0,0 +1,139 @@
+$NetBSD: patch-ao,v 1.1 2006/01/05 10:28:27 markd Exp $
+
+Index: filters/kword/pdf/xpdf/xpdf/Stream.cc
+===================================================================
+--- filters/kword/pdf/xpdf/xpdf/Stream.cc (revision 409205)
++++ filters/kword/pdf/xpdf/xpdf/Stream.cc (revision 488720)
+@@ -15,6 +15,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stddef.h>
++#include <limits.h>
+ #ifndef WIN32
+ #include <unistd.h>
+ #endif
+@@ -409,13 +410,28 @@ StreamPredictor::StreamPredictor(Stream
+ width = widthA;
+ nComps = nCompsA;
+ nBits = nBitsA;
++ predLine = NULL;
++ ok = gFalse;
++
++ if (width <= 0 || nComps <= 0 || nBits <= 0 ||
++ nComps >= INT_MAX / nBits ||
++ width >= INT_MAX / nComps / nBits)
++ return;
+
+ nVals = width * nComps;
++ if (nVals * nBits + 7 <= 0)
++ return;
++
+ pixBytes = (nComps * nBits + 7) >> 3;
+ rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes;
++ if (rowBytes < 0)
++ return;
++
+ predLine = (Guchar *)gmalloc(rowBytes);
+ memset(predLine, 0, rowBytes);
+ predIdx = rowBytes;
++
++ ok = gTrue;
+ }
+
+ StreamPredictor::~StreamPredictor() {
+@@ -982,6 +998,10 @@ LZWStream::LZWStream(Stream *strA, int p
+ FilterStream(strA) {
+ if (predictor != 1) {
+ pred = new StreamPredictor(this, predictor, columns, colors, bits);
++ if ( !pred->isOk()) {
++ delete pred;
++ pred = NULL;
++ }
+ } else {
+ pred = NULL;
+ }
+@@ -1227,6 +1247,10 @@ CCITTFaxStream::CCITTFaxStream(Stream *s
+ endOfLine = endOfLineA;
+ byteAlign = byteAlignA;
+ columns = columnsA;
++ if (columns < 1 || columns >= INT_MAX / sizeof(short)) {
++ error(-1, "invalid number of columns");
++ exit(1);
++ }
+ rows = rowsA;
+ endOfBlock = endOfBlockA;
+ black = blackA;
+@@ -2861,6 +2885,11 @@ GBool DCTStream::readBaselineSOF() {
+ height = read16();
+ width = read16();
+ numComps = str->getChar();
++ if (numComps <= 0 || numComps > 4) {
++ numComps = 0;
++ error(getPos(), "Bad number of components in DCT stream");
++ return gFalse;
++ }
+ if (prec != 8) {
+ error(getPos(), "Bad DCT precision %d", prec);
+ return gFalse;
+@@ -2887,6 +2916,11 @@ GBool DCTStream::readProgressiveSOF() {
+ height = read16();
+ width = read16();
+ numComps = str->getChar();
++ if (numComps <= 0 || numComps > 4) {
++ numComps = 0;
++ error(getPos(), "Bad number of components in DCT stream");
++ return gFalse;
++ }
+ if (prec != 8) {
+ error(getPos(), "Bad DCT precision %d", prec);
+ return gFalse;
+@@ -2909,6 +2943,11 @@ GBool DCTStream::readScanInfo() {
+
+ length = read16() - 2;
+ scanInfo.numComps = str->getChar();
++ if (scanInfo.numComps <= 0 || scanInfo.numComps > 4) {
++ scanInfo.numComps = 0;
++ error(getPos(), "Bad number of components in DCT stream");
++ return gFalse;
++ }
+ --length;
+ if (length != 2 * scanInfo.numComps + 3) {
+ error(getPos(), "Bad DCT scan info block");
+@@ -2976,12 +3015,12 @@ GBool DCTStream::readHuffmanTables() {
+ while (length > 0) {
+ index = str->getChar();
+ --length;
+- if ((index & 0x0f) >= 4) {
++ if ((index & ~0x10) >= 4 || (index & ~0x10) < 0) {
+ error(getPos(), "Bad DCT Huffman table");
+ return gFalse;
+ }
+ if (index & 0x10) {
+- index &= 0x0f;
++ index &= 0x03;
+ if (index >= numACHuffTables)
+ numACHuffTables = index+1;
+ tbl = &acHuffTables[index];
+@@ -3069,9 +3108,11 @@ int DCTStream::readMarker() {
+ do {
+ do {
+ c = str->getChar();
++ if(c == EOF) return EOF;
+ } while (c != 0xff);
+ do {
+ c = str->getChar();
++ if(c == EOF) return EOF;
+ } while (c == 0xff);
+ } while (c == 0x00);
+ return c;
+@@ -3179,6 +3220,10 @@ FlateStream::FlateStream(Stream *strA, i
+ FilterStream(strA) {
+ if (predictor != 1) {
+ pred = new StreamPredictor(this, predictor, columns, colors, bits);
++ if ( !pred->isOk()) {
++ delete pred;
++ pred = NULL;
++ }
+ } else {
+ pred = NULL;
+ }
diff -r ff8f002977c9 -r 947844decb83 misc/koffice/patches/patch-ap
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/koffice/patches/patch-ap Thu Jan 05 10:28:27 2006 +0000
Home |
Main Index |
Thread Index |
Old Index