head 1.9; access; symbols pkgsrc-2013Q2:1.9.0.4 pkgsrc-2013Q2-base:1.9 pkgsrc-2012Q4:1.9.0.2 pkgsrc-2012Q4-base:1.9 pkgsrc-2012Q2:1.8.0.22 pkgsrc-2012Q2-base:1.8 pkgsrc-2012Q1:1.8.0.20 pkgsrc-2012Q1-base:1.8 pkgsrc-2011Q4:1.8.0.18 pkgsrc-2011Q4-base:1.8 pkgsrc-2011Q3:1.8.0.16 pkgsrc-2011Q3-base:1.8 pkgsrc-2011Q2:1.8.0.14 pkgsrc-2011Q2-base:1.8 pkgsrc-2011Q1:1.8.0.12 pkgsrc-2011Q1-base:1.8 pkgsrc-2010Q4:1.8.0.10 pkgsrc-2010Q4-base:1.8 pkgsrc-2010Q3:1.8.0.8 pkgsrc-2010Q3-base:1.8 pkgsrc-2010Q2:1.8.0.6 pkgsrc-2010Q2-base:1.8 pkgsrc-2010Q1:1.8.0.4 pkgsrc-2010Q1-base:1.8 pkgsrc-2009Q4:1.8.0.2 pkgsrc-2009Q4-base:1.8 pkgsrc-2008Q4:1.7.0.12 pkgsrc-2008Q4-base:1.7 pkgsrc-2008Q3:1.7.0.10 pkgsrc-2008Q3-base:1.7 cube-native-xorg:1.7.0.8 cube-native-xorg-base:1.7 pkgsrc-2008Q2:1.7.0.6 pkgsrc-2008Q2-base:1.7 pkgsrc-2008Q1:1.7.0.4 pkgsrc-2008Q1-base:1.7 pkgsrc-2007Q4:1.7.0.2 pkgsrc-2007Q4-base:1.7 pkgsrc-2007Q3:1.4.0.8 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.6 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.4 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.2 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.2.0.6 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.4 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.2 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.1.0.4 pkgsrc-2005Q4-base:1.1 pkgsrc-2005Q3:1.1.0.2; locks; strict; comment @# @; 1.9 date 2012.08.13.11.19.39; author drochner; state dead; branches; next 1.8; 1.8 date 2010.01.09.20.36.34; author tron; state Exp; branches; next 1.7; 1.7 date 2007.11.28.20.54.37; author drochner; state dead; branches; next 1.6; 1.6 date 2007.11.08.12.06.12; author drochner; state Exp; branches; next 1.5; 1.5 date 2007.11.03.16.10.39; author drochner; state dead; branches; next 1.4; 1.4 date 2006.10.12.14.12.15; author drochner; state Exp; branches; next 1.3; 1.3 date 2006.10.10.20.07.05; author rillig; state Exp; branches; next 1.2; 1.2 date 2005.12.31.00.35.55; author wiz; state dead; branches 1.2.6.1; next 1.1; 1.1 date 2005.12.11.05.08.50; author salo; state Exp; branches 1.1.2.1; next ; 1.2.6.1 date 2006.12.09.08.38.35; author salo; state Exp; branches; next ; 1.1.2.1 date 2005.12.11.05.08.50; author seb; state dead; branches; next 1.1.2.2; 1.1.2.2 date 2005.12.15.01.00.51; author seb; state Exp; branches; next ; desc @@ 1.9 log @update to 0.20.3 changes: minor fixes, cleanup pkgsrc note: shlib major changed (for no obvious reason), need revbumps @ text @$NetBSD: patch-ac,v 1.8 2010/01/09 20:36:34 tron Exp $ Fix build with Sun Studio C++. --- goo/gstrtod.cc.orig Wed Sep 9 23:22:31 2009 +++ goo/gstrtod.cc Sat Jan 9 21:24:38 2010 @@@@ -27,6 +27,10 @@@@ #include #include +#if defined(sun) && !defined(__GNUC__) +using namespace std; +#endif + #define ascii_isspace(c) \ (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v') #define ascii_isdigit(c) \ @ 1.8 log @Fix build with Sun Studio C++. @ text @d1 1 a1 1 $NetBSD$ @ 1.7 log @update to 0.6.2 changes: -security fixes (patched in pkgsrc) were integrated upstream -fix some possible crashes -cleanup @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.6 2007/11/08 12:06:12 drochner Exp $ d3 11 a13 112 --- poppler/Stream.cc.orig 2007-09-17 20:37:58.000000000 +0200 +++ poppler/Stream.cc @@@@ -1251,23 +1251,26 @@@@ CCITTFaxStream::CCITTFaxStream(Stream *s columns = columnsA; if (columns < 1) { columns = 1; - } - if (columns + 4 <= 0) { - columns = INT_MAX - 4; + } else if (columns > INT_MAX - 2) { + columns = INT_MAX - 2; } rows = rowsA; endOfBlock = endOfBlockA; black = blackA; - refLine = (short *)gmallocn(columns + 3, sizeof(short)); - codingLine = (short *)gmallocn(columns + 2, sizeof(short)); + // 0 <= codingLine[0] < codingLine[1] < ... < codingLine[n] = columns + // ---> max codingLine size = columns + 1 + // refLine has one extra guard entry at the end + // ---> max refLine size = columns + 2 + codingLine = (int *)gmallocn(columns + 1, sizeof(int)); + refLine = (int *)gmallocn(columns + 2, sizeof(int)); eof = gFalse; row = 0; nextLine2D = encoding < 0; inputBits = 0; - codingLine[0] = 0; - codingLine[1] = refLine[2] = columns; - a0 = 1; + codingLine[0] = columns; + a0i = 0; + outputBits = 0; buf = EOF; } @@@@ -1286,9 +1289,9 @@@@ void CCITTFaxStream::reset() { row = 0; nextLine2D = encoding < 0; inputBits = 0; - codingLine[0] = 0; - codingLine[1] = columns; - a0 = 1; + codingLine[0] = columns; + a0i = 0; + outputBits = 0; buf = EOF; // skip any initial zero bits and end-of-line marker, and get the 2D @@@@ -1305,211 +1308,230 @@@@ void CCITTFaxStream::reset() { } } +inline void CCITTFaxStream::addPixels(int a1, int blackPixels) { + if (a1 > codingLine[a0i]) { + if (a1 > columns) { + error(getPos(), "CCITTFax row is wrong length (%d)", a1); + err = gTrue; + a1 = columns; + } + if ((a0i & 1) ^ blackPixels) { + ++a0i; + } + codingLine[a0i] = a1; + } +} + +inline void CCITTFaxStream::addPixelsNeg(int a1, int blackPixels) { + if (a1 > codingLine[a0i]) { + if (a1 > columns) { + error(getPos(), "CCITTFax row is wrong length (%d)", a1); + err = gTrue; + a1 = columns; + } + if ((a0i & 1) ^ blackPixels) { + ++a0i; + } + codingLine[a0i] = a1; + } else if (a1 < codingLine[a0i]) { + if (a1 < 0) { + error(getPos(), "Invalid CCITTFax code"); + err = gTrue; + a1 = 0; + } + while (a0i > 0 && a1 <= codingLine[a0i - 1]) { + --a0i; + } + codingLine[a0i] = a1; + } +} + int CCITTFaxStream::lookChar() { short code1, code2, code3; - int a0New; - GBool err, gotEOL; - int ret; - int bits, i; + int b1i, blackPixels, i, bits; + GBool gotEOL; - // if at eof just return EOF - if (eof && codingLine[a0] >= columns) { - return EOF; + if (buf != EOF) { + return buf; } // read the next row - err = gFalse; - if (codingLine[a0] >= columns) { + if (outputBits == 0) { d15 3 a17 503 + // if at eof just return EOF + if (eof) { + return EOF; + } + + err = gFalse; // 2-D encoding if (nextLine2D) { - // state: - // a0New = current position in coding line (0 <= a0New <= columns) - // codingLine[a0] = last change in coding line - // (black-to-white if a0 is even, - // white-to-black if a0 is odd) - // refLine[b1] = next change in reference line of opposite color - // to a0 - // invariants: - // 0 <= codingLine[a0] <= a0New - // <= refLine[b1] <= refLine[b1+1] <= columns - // 0 <= a0 <= columns+1 - // refLine[0] = 0 - // refLine[n] = refLine[n+1] = columns - // -- for some 1 <= n <= columns+1 - // end condition: - // 0 = codingLine[0] <= codingLine[1] < codingLine[2] < ... - // < codingLine[n-1] < codingLine[n] = columns - // -- where 1 <= n <= columns+1 for (i = 0; codingLine[i] < columns; ++i) { refLine[i] = codingLine[i]; } - refLine[i] = refLine[i + 1] = columns; - b1 = 1; - a0New = codingLine[a0 = 0] = 0; - do { + refLine[i++] = columns; + refLine[i] = columns; + codingLine[0] = 0; + a0i = 0; + b1i = 0; + blackPixels = 0; + // invariant: + // refLine[b1i-1] <= codingLine[a0i] < refLine[b1i] < refLine[b1i+1] + // <= columns + // exception at left edge: + // codingLine[a0i = 0] = refLine[b1i = 0] = 0 is possible + // exception at right edge: + // refLine[b1i] = refLine[b1i+1] = columns is possible + while (codingLine[a0i] < columns) { code1 = getTwoDimCode(); switch (code1) { case twoDimPass: - if (refLine[b1] < columns) { - a0New = refLine[b1 + 1]; - b1 += 2; + addPixels(refLine[b1i + 1], blackPixels); + if (refLine[b1i + 1] < columns) { + b1i += 2; } break; case twoDimHoriz: - if ((a0 & 1) == 0) { code1 = code2 = 0; + if (blackPixels) { do { - code1 += code3 = getWhiteCode(); + code1 += code3 = getBlackCode(); } while (code3 >= 64); do { - code2 += code3 = getBlackCode(); + code2 += code3 = getWhiteCode(); } while (code3 >= 64); } else { - code1 = code2 = 0; do { - code1 += code3 = getBlackCode(); + code1 += code3 = getWhiteCode(); } while (code3 >= 64); do { - code2 += code3 = getWhiteCode(); + code2 += code3 = getBlackCode(); } while (code3 >= 64); } - if (code1 > 0 || code2 > 0) { - if (a0New + code1 <= columns) { - codingLine[a0 + 1] = a0New + code1; - } else { - codingLine[a0 + 1] = columns; - } - ++a0; - if (codingLine[a0] + code2 <= columns) { - codingLine[a0 + 1] = codingLine[a0] + code2; - } else { - codingLine[a0 + 1] = columns; - } - ++a0; - a0New = codingLine[a0]; - while (refLine[b1] <= a0New && refLine[b1] < columns) { - b1 += 2; + addPixels(codingLine[a0i] + code1, blackPixels); + if (codingLine[a0i] < columns) { + addPixels(codingLine[a0i] + code2, blackPixels ^ 1); + } + while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { + b1i += 2; + } + break; + case twoDimVertR3: + addPixels(refLine[b1i] + 3, blackPixels); + blackPixels ^= 1; + if (codingLine[a0i] < columns) { + ++b1i; + while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { + b1i += 2; } } break; - case twoDimVert0: - if (refLine[b1] < columns) { - a0New = codingLine[++a0] = refLine[b1]; - ++b1; - while (refLine[b1] <= a0New && refLine[b1] < columns) { - b1 += 2; + case twoDimVertR2: + addPixels(refLine[b1i] + 2, blackPixels); + blackPixels ^= 1; + if (codingLine[a0i] < columns) { + ++b1i; + while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { + b1i += 2; } - } else { - a0New = codingLine[++a0] = columns; } break; case twoDimVertR1: - if (refLine[b1] + 1 < columns) { - a0New = codingLine[++a0] = refLine[b1] + 1; - ++b1; - while (refLine[b1] <= a0New && refLine[b1] < columns) { - b1 += 2; + addPixels(refLine[b1i] + 1, blackPixels); + blackPixels ^= 1; + if (codingLine[a0i] < columns) { + ++b1i; + while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { + b1i += 2; } - } else { - a0New = codingLine[++a0] = columns; } break; - case twoDimVertL1: - if (refLine[b1] - 1 > a0New || (a0 == 0 && refLine[b1] == 1)) { - a0New = codingLine[++a0] = refLine[b1] - 1; - --b1; - while (refLine[b1] <= a0New && refLine[b1] < columns) { - b1 += 2; + case twoDimVert0: + addPixels(refLine[b1i], blackPixels); + blackPixels ^= 1; + if (codingLine[a0i] < columns) { + ++b1i; + while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { + b1i += 2; } } break; - case twoDimVertR2: - if (refLine[b1] + 2 < columns) { - a0New = codingLine[++a0] = refLine[b1] + 2; - ++b1; - while (refLine[b1] <= a0New && refLine[b1] < columns) { - b1 += 2; + case twoDimVertL3: + addPixelsNeg(refLine[b1i] - 3, blackPixels); + blackPixels ^= 1; + if (codingLine[a0i] < columns) { + if (b1i > 0) { + --b1i; + } else { + ++b1i; + } + while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { + b1i += 2; } - } else { - a0New = codingLine[++a0] = columns; } break; case twoDimVertL2: - if (refLine[b1] - 2 > a0New || (a0 == 0 && refLine[b1] == 2)) { - a0New = codingLine[++a0] = refLine[b1] - 2; - --b1; - while (refLine[b1] <= a0New && refLine[b1] < columns) { - b1 += 2; + addPixelsNeg(refLine[b1i] - 2, blackPixels); + blackPixels ^= 1; + if (codingLine[a0i] < columns) { + if (b1i > 0) { + --b1i; + } else { + ++b1i; } - } - break; - case twoDimVertR3: - if (refLine[b1] + 3 < columns) { - a0New = codingLine[++a0] = refLine[b1] + 3; - ++b1; - while (refLine[b1] <= a0New && refLine[b1] < columns) { - b1 += 2; + while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { + b1i += 2; } - } else { - a0New = codingLine[++a0] = columns; } break; - case twoDimVertL3: - if (refLine[b1] - 3 > a0New || (a0 == 0 && refLine[b1] == 3)) { - a0New = codingLine[++a0] = refLine[b1] - 3; - --b1; - while (refLine[b1] <= a0New && refLine[b1] < columns) { - b1 += 2; + case twoDimVertL1: + addPixelsNeg(refLine[b1i] - 1, blackPixels); + blackPixels ^= 1; + if (codingLine[a0i] < columns) { + if (b1i > 0) { + --b1i; + } else { + ++b1i; + } + while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { + b1i += 2; } } break; case EOF: + addPixels(columns, 0); eof = gTrue; - codingLine[a0 = 0] = columns; - return EOF; + break; default: error(getPos(), "Bad 2D code %04x in CCITTFax stream", code1); + addPixels(columns, 0); err = gTrue; break; } - } while (codingLine[a0] < columns); + } // 1-D encoding } else { - codingLine[a0 = 0] = 0; - while (1) { + codingLine[0] = 0; + a0i = 0; + blackPixels = 0; + while (codingLine[a0i] < columns) { code1 = 0; - do { - code1 += code3 = getWhiteCode(); - } while (code3 >= 64); - codingLine[a0+1] = codingLine[a0] + code1; - ++a0; - if (codingLine[a0] >= columns) { - break; - } - code2 = 0; - do { - code2 += code3 = getBlackCode(); - } while (code3 >= 64); - codingLine[a0+1] = codingLine[a0] + code2; - ++a0; - if (codingLine[a0] >= columns) { - break; + if (blackPixels) { + do { + code1 += code3 = getBlackCode(); + } while (code3 >= 64); + } else { + do { + code1 += code3 = getWhiteCode(); + } while (code3 >= 64); } + addPixels(codingLine[a0i] + code1, blackPixels); + blackPixels ^= 1; } } - if (codingLine[a0] != columns) { - error(getPos(), "CCITTFax row is wrong length (%d)", codingLine[a0]); - // force the row to be the correct length - while (codingLine[a0] > columns) { - --a0; - } - codingLine[++a0] = columns; - err = gTrue; - } - // byte-align the row if (byteAlign) { inputBits &= ~7; @@@@ -1568,14 +1590,17 @@@@ int CCITTFaxStream::lookChar() { // this if we know the stream contains end-of-line markers because // the "just plow on" technique tends to work better otherwise } else if (err && endOfLine) { - do { + while (1) { + code1 = lookBits(13); if (code1 == EOF) { eof = gTrue; return EOF; } + if ((code1 >> 1) == 0x001) { + break; + } eatBits(1); - code1 = lookBits(13); - } while ((code1 >> 1) != 0x001); + } eatBits(12); if (encoding > 0) { eatBits(1); @@@@ -1583,11 +1608,11 @@@@ int CCITTFaxStream::lookChar() { } } - a0 = 0; - outputBits = codingLine[1] - codingLine[0]; - if (outputBits == 0) { - a0 = 1; - outputBits = codingLine[2] - codingLine[1]; + // set up for output + if (codingLine[0] > 0) { + outputBits = codingLine[a0i = 0]; + } else { + outputBits = codingLine[a0i = 1]; } ++row; @@@@ -1595,39 +1620,43 @@@@ int CCITTFaxStream::lookChar() { // get a byte if (outputBits >= 8) { - ret = ((a0 & 1) == 0) ? 0xff : 0x00; - if ((outputBits -= 8) == 0) { - ++a0; - if (codingLine[a0] < columns) { - outputBits = codingLine[a0 + 1] - codingLine[a0]; - } + buf = (a0i & 1) ? 0x00 : 0xff; + outputBits -= 8; + if (outputBits == 0 && codingLine[a0i] < columns) { + ++a0i; + outputBits = codingLine[a0i] - codingLine[a0i - 1]; } } else { bits = 8; - ret = 0; + buf = 0; do { if (outputBits > bits) { - i = bits; - bits = 0; - if ((a0 & 1) == 0) { - ret |= 0xff >> (8 - i); + buf <<= bits; + if (!(a0i & 1)) { + buf |= 0xff >> (8 - bits); } - outputBits -= i; + outputBits -= bits; + bits = 0; } else { - i = outputBits; - bits -= outputBits; - if ((a0 & 1) == 0) { - ret |= (0xff >> (8 - i)) << bits; + buf <<= outputBits; + if (!(a0i & 1)) { + buf |= 0xff >> (8 - outputBits); } + bits -= outputBits; outputBits = 0; - ++a0; - if (codingLine[a0] < columns) { - outputBits = codingLine[a0 + 1] - codingLine[a0]; + if (codingLine[a0i] < columns) { + ++a0i; + outputBits = codingLine[a0i] - codingLine[a0i - 1]; + } else if (bits > 0) { + buf <<= bits; + bits = 0; } } - } while (bits > 0 && codingLine[a0] < columns); + } while (bits); + } + if (black) { + buf ^= 0xff; } - buf = black ? (ret ^ 0xff) : ret; return buf; } @@@@ -1669,6 +1698,9 @@@@ short CCITTFaxStream::getWhiteCode() { code = 0; // make gcc happy if (endOfBlock) { code = lookBits(12); + if (code == EOF) { + return 1; + } if ((code >> 5) == 0) { p = &whiteTab1[code]; } else { @@@@ -1681,6 +1713,9 @@@@ short CCITTFaxStream::getWhiteCode() { } else { for (n = 1; n <= 9; ++n) { code = lookBits(n); + if (code == EOF) { + return 1; + } if (n < 9) { code <<= 9 - n; } @@@@ -1692,6 +1727,9 @@@@ short CCITTFaxStream::getWhiteCode() { } for (n = 11; n <= 12; ++n) { code = lookBits(n); + if (code == EOF) { + return 1; + } if (n < 12) { code <<= 12 - n; } @@@@ -1717,6 +1755,9 @@@@ short CCITTFaxStream::getBlackCode() { code = 0; // make gcc happy if (endOfBlock) { code = lookBits(13); + if (code == EOF) { + return 1; + } if ((code >> 7) == 0) { p = &blackTab1[code]; } else if ((code >> 9) == 0 && (code >> 7) != 0) { @@@@ -1731,6 +1772,9 @@@@ short CCITTFaxStream::getBlackCode() { } else { for (n = 2; n <= 6; ++n) { code = lookBits(n); + if (code == EOF) { + return 1; + } if (n < 6) { code <<= 6 - n; } @@@@ -1742,6 +1786,9 @@@@ short CCITTFaxStream::getBlackCode() { } for (n = 7; n <= 12; ++n) { code = lookBits(n); + if (code == EOF) { + return 1; + } if (n < 12) { code <<= 12 - n; } @@@@ -1755,6 +1802,9 @@@@ short CCITTFaxStream::getBlackCode() { } for (n = 10; n <= 13; ++n) { code = lookBits(n); + if (code == EOF) { + return 1; + } if (n < 13) { code <<= 13 - n; } @@@@ -1971,6 +2021,12 @@@@ void DCTStream::reset() { // allocate a buffer for the whole image bufWidth = ((width + mcuWidth - 1) / mcuWidth) * mcuWidth; bufHeight = ((height + mcuHeight - 1) / mcuHeight) * mcuHeight; + if (bufWidth <= 0 || bufHeight <= 0 || + bufWidth > INT_MAX / bufWidth / (int)sizeof(int)) { + error(getPos(), "Invalid image size in DCT stream"); + y = height; + return; + } for (i = 0; i < numComps; ++i) { frameBuf[i] = (int *)gmallocn(bufWidth * bufHeight, sizeof(int)); memset(frameBuf[i], 0, bufWidth * bufHeight * sizeof(int)); @@@@ -3041,6 +3097,11 @@@@ GBool DCTStream::readScanInfo() { } scanInfo.firstCoeff = str->getChar(); scanInfo.lastCoeff = str->getChar(); + if (scanInfo.firstCoeff < 0 || scanInfo.lastCoeff > 63 || + scanInfo.firstCoeff > scanInfo.lastCoeff) { + error(getPos(), "Bad DCT coefficient numbers in scan info block"); + return gFalse; + } c = str->getChar(); scanInfo.ah = (c >> 4) & 0x0f; scanInfo.al = c & 0x0f; @ 1.6 log @apply a patch from poppler CVS (derived from xpdf) to fix a couple of memory corruption / buffer overflows (CVE-2007-4352, CVE-2007-5392, CVE-2007-5393) bump PKGREVISION @ text @d1 1 a1 1 $NetBSD$ @ 1.5 log @update to 0.6.1 This switches to the new 0.6 branch which is not source compatible to 0.5.x. Most notable changes: -Merge xpdf 3.02 changes -Support for Sound objects -Support for Opening/Closing page actions -Support for page duration -Improve PS Tokenizer performance -Beginning of Interactive Form support -xpdfrc is no longer used for anything -Fix security issue MOAB-06-01-2007 -Lots of bugs fixed @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.4 2006/10/12 14:12:15 drochner Exp $ d3 616 a618 47 --- configure.orig 2006-10-12 12:26:10.000000000 +0200 +++ configure @@@@ -25346,7 +25346,7 @@@@ if test "x$qt_libdir" != "xno" ; then fi fi -if test "x$have_qt" == "xyes"; then +if test "x$have_qt" = "xyes"; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@@@ -25534,7 +25534,7 @@@@ if test "x$qt_libdir" != "xno" ; then fi fi -if test "x$have_qt" == "xyes"; then +if test "x$have_qt" = "xyes"; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@@@ -25754,7 +25754,7 @@@@ if test "x$qt4_libdir" != "xno" ; then fi fi -if test "x$have_qt4" == "xyes"; then +if test "x$have_qt4" = "xyes"; then POPPLER_QT4_CXXFLAGS="-I$qt4_incdir" if test x$windows_qt = xyes; then POPPLER_QT4_LIBS="-L$qt4_libdir -lQtCore4 -lQtGui4 -lQtXml4" @@@@ -25827,7 +25827,7 @@@@ if test "x$qt4_libdir" != "xno" ; then fi fi -if test "x$have_qt4" == "xyes"; then +if test "x$have_qt4" = "xyes"; then POPPLER_QT4_CXXFLAGS="-I$qt4_incdir" if test x$windows_qt = xyes; then POPPLER_QT4_LIBS="-L$qt4_libdir -lQtCore4 -lQtGui4 -lQtXml4" @@@@ -25910,7 +25910,7 @@@@ if test "x$qt4test_libdir" != "xno" ; th fi fi -if test "x$have_qt4testlib" == "xyes"; then +if test "x$have_qt4testlib" = "xyes"; then POPPLER_QTTEST_CXXFLAGS="-I$qt4test_incdir" POPPLER_QTTEST_LIBS="-L$qt4test_libdir -lQtTest" enable_poppler_qt4testlib="yes" @ 1.4 log @update to 0.5.4 changes: -Automatically read in CJK encoding files -Speed ups -let the utils take input on stdin -Bugs fixed @ text @d1 1 a1 1 $NetBSD$ @ 1.3 log @Fixed "test ==". @ text @d3 3 a5 3 --- configure.orig 2006-10-10 21:12:34.000000000 +0200 +++ configure 2006-10-10 22:05:51.000000000 +0200 @@@@ -24856,7 +24856,7 @@@@ if test "x$qt_libdir" != "xno" ; then d14 1 a14 1 @@@@ -25044,7 +25044,7 @@@@ if test "x$qt_libdir" != "xno" ; then d23 1 a23 1 @@@@ -25259,7 +25259,7 @@@@ if test "x$qt4_libdir" != "xno" ; then d32 1 a32 1 @@@@ -25332,7 +25332,7 @@@@ if test "x$qt4_libdir" != "xno" ; then d41 1 a41 1 @@@@ -25410,7 +25410,7 @@@@ if test "x$qt4test_libdir" != "xno" ; th @ 1.2 log @Update to 0.4.3: - Fix selection crasher (Nickolay V. Shmyrev, #4402). - Fix printing problem for single page output (#4555). - Fix miscellaneous compile problems/warnings. - CVE-2005-3191 and CAN-2005-2097 security fixes. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.1 2005/12/11 05:08:50 salo Exp $ d3 14 a16 5 Security fix for CVE-2005-3192. --- poppler/Stream.h.orig 2005-04-27 22:56:18.000000000 +0200 +++ poppler/Stream.h 2005-12-11 05:51:36.000000000 +0100 @@@@ -231,6 +231,8 @@@@ public: d18 8 a25 1 ~StreamPredictor(); d27 8 a34 4 + GBool isOk() { return ok; } + int lookChar(); int getChar(); d36 8 a43 6 @@@@ -248,6 +250,7 @@@@ private: int rowBytes; // bytes per line Guchar *predLine; // line buffer int predIdx; // current index in predLine + GBool ok; }; d45 5 a49 1 //------------------------------------------------------------------------ @ 1.2.6.1 log @Pullup ticket 1940 - requested by wiz security update for evince Revisions pulled up: - pkgsrc/print/evince/Makefile 1.26, 1.27 - pkgsrc/print/evince/Makefile.common 1.12 - pkgsrc/print/evince/PLIST 1.13 - pkgsrc/print/evince/distinfo 1.9, 1.10 - pkgsrc/print/evince/patches/patch-ac 1.1 - pkgsrc/print/evince-nautilus/Makefile 1.11, 1.12 - pkgsrc/print/poppler/Makefile.common 1.7 - pkgsrc/print/poppler/distinfo 1.14, 1.15 - pkgsrc/print/poppler/patches/patch-ab 1.6 - pkgsrc/print/poppler/patches/patch-ac 1.3, 1.4 - pkgsrc/print/poppler-qt/Makefile 1.14 - pkgsrc/print/poppler-qt/PLIST 1.3 Module Name: pkgsrc Committed By: drochner Date: Thu Oct 12 14:16:22 UTC 2006 Modified Files: pkgsrc/print/evince: Makefile Makefile.common PLIST distinfo pkgsrc/print/evince-nautilus: Makefile Log Message: update to 0.6.1 canges: -bugfixes -translation updates pkgsrc change: include tiff/buildlink directly instead relying on gtk to pull it in --- Module Name: pkgsrc Committed By: wiz Date: Wed Dec 6 14:48:35 UTC 2006 Modified Files: pkgsrc/print/evince: Makefile distinfo Added Files: pkgsrc/print/evince/patches: patch-ac Log Message: Fix CVE-2006-5864 using a patch from evince CVS. Bump PKGREVISION. --- Module Name: pkgsrc Committed By: wiz Date: Wed Dec 6 14:51:36 UTC 2006 Modified Files: pkgsrc/print/evince-nautilus: Makefile Log Message: Bump PKGREVISION for evince/patches/patch-ac, to be on the safe side. --- Module Name: pkgsrc Committed By: rillig Date: Tue Oct 10 20:07:05 UTC 2006 Modified Files: pkgsrc/print/poppler: distinfo Added Files: pkgsrc/print/poppler/patches: patch-ac Log Message: Fixed "test ==". --- Module Name: pkgsrc Committed By: drochner Date: Thu Oct 12 14:12:15 UTC 2006 Modified Files: pkgsrc/print/poppler: Makefile.common distinfo pkgsrc/print/poppler/patches: patch-ab patch-ac Log Message: update to 0.5.4 changes: -Automatically read in CJK encoding files -Speed ups -let the utils take input on stdin -Bugs fixed --- Module Name: pkgsrc Committed By: markd Date: Fri Oct 13 20:25:22 UTC 2006 Modified Files: pkgsrc/print/poppler-qt: Makefile PLIST Log Message: poppler-link-qt3.h should also be installed. Bump PKGREVISION. Should fix PR pkg/34810. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.4 2006/10/12 14:12:15 drochner Exp $ d3 5 a7 14 --- configure.orig 2006-10-12 12:26:10.000000000 +0200 +++ configure @@@@ -25346,7 +25346,7 @@@@ if test "x$qt_libdir" != "xno" ; then fi fi -if test "x$have_qt" == "xyes"; then +if test "x$have_qt" = "xyes"; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@@@ -25534,7 +25534,7 @@@@ if test "x$qt_libdir" != "xno" ; then fi fi d9 1 a9 8 -if test "x$have_qt" == "xyes"; then +if test "x$have_qt" = "xyes"; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@@@ -25754,7 +25754,7 @@@@ if test "x$qt4_libdir" != "xno" ; then fi fi d11 4 a14 8 -if test "x$have_qt4" == "xyes"; then +if test "x$have_qt4" = "xyes"; then POPPLER_QT4_CXXFLAGS="-I$qt4_incdir" if test x$windows_qt = xyes; then POPPLER_QT4_LIBS="-L$qt4_libdir -lQtCore4 -lQtGui4 -lQtXml4" @@@@ -25827,7 +25827,7 @@@@ if test "x$qt4_libdir" != "xno" ; then fi fi d16 6 a21 8 -if test "x$have_qt4" == "xyes"; then +if test "x$have_qt4" = "xyes"; then POPPLER_QT4_CXXFLAGS="-I$qt4_incdir" if test x$windows_qt = xyes; then POPPLER_QT4_LIBS="-L$qt4_libdir -lQtCore4 -lQtGui4 -lQtXml4" @@@@ -25910,7 +25910,7 @@@@ if test "x$qt4test_libdir" != "xno" ; th fi fi d23 1 a23 5 -if test "x$have_qt4testlib" == "xyes"; then +if test "x$have_qt4testlib" = "xyes"; then POPPLER_QTTEST_CXXFLAGS="-I$qt4test_incdir" POPPLER_QTTEST_LIBS="-L$qt4test_libdir -lQtTest" enable_poppler_qt4testlib="yes" @ 1.1 log @Security fixes for CVE-2005-3191, CVE-2005-3192 and CVE-2005-3193. Patches from xpdf. @ text @d1 1 a1 1 $NetBSD$ @ 1.1.2.1 log @file patch-ac was added on branch pkgsrc-2005Q3 on 2005-12-11 05:08:50 +0000 @ text @d1 23 @ 1.1.2.2 log @Pullup ticket 955 - requested by Lubomir Sedlacik security fix via patch for print/poppler Module Name: pkgsrc Committed By: salo Date: Sun Dec 11 05:08:50 UTC 2005 Modified Files: pkgsrc/print/poppler: Makefile distinfo Added Files: pkgsrc/print/poppler/patches: patch-aa patch-ab patch-ac Log Message: Security fixes for CVE-2005-3191, CVE-2005-3192 and CVE-2005-3193. Patches from xpdf. @ text @a0 78 $NetBSD: patch-ac,v 1.1.2.1 2005/12/15 01:00:51 seb Exp $ Security fix for CVE-2005-3191 and CVE-2005-3192. --- poppler/Stream.cc.orig 2005-04-28 17:23:34.000000000 +0200 +++ poppler/Stream.cc 2005-12-11 06:14:45.000000000 +0100 @@@@ -415,18 +415,33 @@@@ void ImageStream::skipLine() { 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 @@@@ 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; } @@@@ -2907,6 +2926,14 @@@@ GBool DCTStream::readBaselineSOF() { 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 @@@@ 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; } @