aboutsummaryrefslogtreecommitdiff
path: root/graphics/poppler/files
diff options
context:
space:
mode:
authorMichael Johnson <ahze@FreeBSD.org>2005-12-14 01:42:56 +0000
committerMichael Johnson <ahze@FreeBSD.org>2005-12-14 01:42:56 +0000
commit042239f605b3c609b6f9b0e9e18ef2900bfcbff2 (patch)
treef7795ebaa010e649b81c0fa7f382b53cb5a21218 /graphics/poppler/files
parent237cdade1f6fc099f8643c22feee52edcc6c3d46 (diff)
downloadports-042239f605b3c609b6f9b0e9e18ef2900bfcbff2.tar.gz
ports-042239f605b3c609b6f9b0e9e18ef2900bfcbff2.zip
Notes
Diffstat (limited to 'graphics/poppler/files')
-rw-r--r--graphics/poppler/files/patch-SA17897120
-rw-r--r--graphics/poppler/files/patch-poppler_CairoOutputDev.cc33
-rw-r--r--graphics/poppler/files/patch-security58
3 files changed, 0 insertions, 211 deletions
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)");
-