diff options
author | Michael Johnson <ahze@FreeBSD.org> | 2005-12-14 01:42:56 +0000 |
---|---|---|
committer | Michael Johnson <ahze@FreeBSD.org> | 2005-12-14 01:42:56 +0000 |
commit | 042239f605b3c609b6f9b0e9e18ef2900bfcbff2 (patch) | |
tree | f7795ebaa010e649b81c0fa7f382b53cb5a21218 /graphics/poppler | |
parent | 237cdade1f6fc099f8643c22feee52edcc6c3d46 (diff) | |
download | ports-042239f605b3c609b6f9b0e9e18ef2900bfcbff2.tar.gz ports-042239f605b3c609b6f9b0e9e18ef2900bfcbff2.zip |
Notes
Diffstat (limited to 'graphics/poppler')
-rw-r--r-- | graphics/poppler/Makefile | 4 | ||||
-rw-r--r-- | graphics/poppler/distinfo | 6 | ||||
-rw-r--r-- | graphics/poppler/files/patch-SA17897 | 120 | ||||
-rw-r--r-- | graphics/poppler/files/patch-poppler_CairoOutputDev.cc | 33 | ||||
-rw-r--r-- | graphics/poppler/files/patch-security | 58 |
5 files changed, 5 insertions, 216 deletions
diff --git a/graphics/poppler/Makefile b/graphics/poppler/Makefile index 27f6c0d3d3fb..f0af4751cf6d 100644 --- a/graphics/poppler/Makefile +++ b/graphics/poppler/Makefile @@ -7,8 +7,7 @@ # PORTNAME= poppler -PORTVERSION= 0.4.2 -PORTREVISION= 1 +PORTVERSION= 0.4.3 CATEGORIES= graphics print MASTER_SITES= http://poppler.freedesktop.org/ @@ -20,6 +19,7 @@ USE_GMAKE= yes USE_AUTOTOOLS= libtool:15 USE_GNOME= gnomeprefix gnomehack gtk20 INSTALLS_SHLIB= yes +CONFIGURE_ARGS= --enable-zlib CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${LOCALBASE}/include/freetype2" \ LDFLAGS="-L${LOCALBASE}/lib" diff --git a/graphics/poppler/distinfo b/graphics/poppler/distinfo index e9c864ab3cfa..35814ce9d3ca 100644 --- a/graphics/poppler/distinfo +++ b/graphics/poppler/distinfo @@ -1,3 +1,3 @@ -MD5 (poppler-0.4.2.tar.gz) = beb1eea135a3c5b679a7a22d01a500c0 -SHA256 (poppler-0.4.2.tar.gz) = 22f1e7b6e0cfabbb4c015683a028e6582e0fc10fc1dd9b1040c506b319751d6f -SIZE (poppler-0.4.2.tar.gz) = 777935 +MD5 (poppler-0.4.3.tar.gz) = 791dc78d8366eb05580183fe85174555 +SHA256 (poppler-0.4.3.tar.gz) = e9497a358fcc86c1383f1faa6ddc3042e0906af04c236e04e62fde38c13443e1 +SIZE (poppler-0.4.3.tar.gz) = 779582 diff --git a/graphics/poppler/files/patch-SA17897 b/graphics/poppler/files/patch-SA17897 deleted file mode 100644 index 61b5472fe06f..000000000000 --- a/graphics/poppler/files/patch-SA17897 +++ /dev/null @@ -1,120 +0,0 @@ ---- poppler/JPXStream.cc.orig Thu Mar 3 16:46:03 2005 -+++ poppler/JPXStream.cc Wed Dec 7 00:33:40 2005 -@@ -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,8 +701,13 @@ - / img.xTileSize; - img.nYTiles = (img.ySize - img.yTileOffset + img.yTileSize - 1) - / img.yTileSize; -- img.tiles = (JPXTile *)gmalloc(img.nXTiles * img.nYTiles * -- sizeof(JPXTile)); -+ 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)); - for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { - img.tiles[i].tileComps = (JPXTileComp *)gmalloc(img.nComps * - sizeof(JPXTileComp)); ---- poppler/Stream.cc.orig Wed Apr 27 17:56:18 2005 -+++ poppler/Stream.cc Wed Dec 7 00:32:08 2005 -@@ -415,18 +415,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() { -@@ -1020,6 +1035,10 @@ - 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 @@ - 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 @@ - FilterStream(strA) { - if (predictor != 1) { - pred = new StreamPredictor(this, predictor, columns, colors, bits); -+ if (!pred->isOk()) { -+ delete pred; -+ pred = NULL; -+ } - } else { - pred = NULL; - } ---- poppler/Stream.h.orig Wed Apr 27 17:56:18 2005 -+++ poppler/Stream.h Wed Dec 7 00:32:08 2005 -@@ -231,6 +231,8 @@ - - ~StreamPredictor(); - -+ GBool isOk() { return ok; } -+ - int lookChar(); - int getChar(); - -@@ -248,6 +250,7 @@ - int rowBytes; // bytes per line - Guchar *predLine; // line buffer - int predIdx; // current index in predLine -+ GBool ok; - }; - - //------------------------------------------------------------------------ diff --git a/graphics/poppler/files/patch-poppler_CairoOutputDev.cc b/graphics/poppler/files/patch-poppler_CairoOutputDev.cc deleted file mode 100644 index 67ad678484ad..000000000000 --- a/graphics/poppler/files/patch-poppler_CairoOutputDev.cc +++ /dev/null @@ -1,33 +0,0 @@ ---- poppler/CairoOutputDev.cc.orig Thu Mar 3 03:10:24 2005 -+++ poppler/CairoOutputDev.cc Thu Mar 3 03:10:58 2005 -@@ -240,7 +240,7 @@ - if (subpath->getNumPoints() > 0) { - state->transform(subpath->getX(0), subpath->getY(0), &x1, &y1); - if (snapToGrid) { -- x1 = round (x1); y1 = round (y1); -+ x1 = rint (x1); y1 = rint (y1); - } - cairo_move_to (cairo, x1, y1); - LOG (printf ("move_to %f, %f\n", x1, y1)); -@@ -248,9 +248,9 @@ - while (j < subpath->getNumPoints()) { - if (subpath->getCurve(j)) { - if (snapToGrid) { -- x1 = round (x1); y1 = round (y1); -- x2 = round (x2); y2 = round (y2); -- x3 = round (x3); y3 = round (y3); -+ x1 = rint (x1); y1 = rint (y1); -+ x2 = rint (x2); y2 = rint (y2); -+ x3 = rint (x3); y3 = rint (y3); - } - state->transform(subpath->getX(j), subpath->getY(j), &x1, &y1); - state->transform(subpath->getX(j+1), subpath->getY(j+1), &x2, &y2); -@@ -264,7 +264,7 @@ - } else { - state->transform(subpath->getX(j), subpath->getY(j), &x1, &y1); - if (snapToGrid) { -- x1 = round (x1); y1 = round (y1); -+ x1 = rint (x1); y1 = rint (y1); - } - cairo_line_to (cairo, x1, y1); - LOG(printf ("line_to %f, %f\n", x1, y1)); diff --git a/graphics/poppler/files/patch-security b/graphics/poppler/files/patch-security deleted file mode 100644 index 8b1b1c2a505e..000000000000 --- a/graphics/poppler/files/patch-security +++ /dev/null @@ -1,58 +0,0 @@ ---- fofi/FoFiTrueType.cc.orig Thu Jan 22 02:26:44 2004 -+++ fofi/FoFiTrueType.cc Thu Aug 11 16:55:52 2005 -@@ -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) { ---- poppler/SplashOutputDev.cc.orig Thu Aug 11 16:51:38 2005 -+++ poppler/SplashOutputDev.cc Thu Aug 11 16:55:52 2005 -@@ -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)"); - |