diff options
author | drochner <drochner@pkgsrc.org> | 2009-02-26 20:23:02 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2009-02-26 20:23:02 +0000 |
commit | 2748ba1cf65e11781b4e56e32035da7605b2b995 (patch) | |
tree | 3f66b1607e9fb39efed0257eb9eef30c17d851a1 /print/poppler | |
parent | be5a3260e1a2fd8bb0df3d40d128d07ee5f881a7 (diff) | |
download | pkgsrc-2748ba1cf65e11781b4e56e32035da7605b2b995.tar.gz |
pull some patches from upstream, to fix two crashes and an off-by-one
in color management support, bump PKGREVISION
Diffstat (limited to 'print/poppler')
-rw-r--r-- | print/poppler/Makefile | 4 | ||||
-rw-r--r-- | print/poppler/distinfo | 6 | ||||
-rw-r--r-- | print/poppler/patches/patch-ba | 13 | ||||
-rw-r--r-- | print/poppler/patches/patch-bb | 197 | ||||
-rw-r--r-- | print/poppler/patches/patch-ca | 4 |
5 files changed, 219 insertions, 5 deletions
diff --git a/print/poppler/Makefile b/print/poppler/Makefile index 65222d00d27..30d9b432691 100644 --- a/print/poppler/Makefile +++ b/print/poppler/Makefile @@ -1,8 +1,10 @@ -# $NetBSD: Makefile,v 1.35 2009/02/12 20:55:07 drochner Exp $ +# $NetBSD: Makefile,v 1.36 2009/02/26 20:23:02 drochner Exp $ # .include "../../print/poppler/Makefile.common" +PKGREVISION= 1 + COMMENT= PDF rendering library MAINTAINER= reed@reedmedia.net diff --git a/print/poppler/distinfo b/print/poppler/distinfo index 75554ca0b43..3e417317b45 100644 --- a/print/poppler/distinfo +++ b/print/poppler/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.39 2009/02/12 20:55:07 drochner Exp $ +$NetBSD: distinfo,v 1.40 2009/02/26 20:23:02 drochner Exp $ SHA1 (poppler-0.10.4.tar.gz) = e8a5a1090394a2cfab3c9aa67d188f3628c60165 RMD160 (poppler-0.10.4.tar.gz) = 62815f486a4f1eaa226e84aa953134be6a209ed6 @@ -9,5 +9,7 @@ SHA1 (patch-ag) = 0bf1bc080cad55792fe6cc761bf22ecccba7d13a SHA1 (patch-ai) = 852332490394756c496d06eb109f3d1d637f8717 SHA1 (patch-aj) = 8bb1fe169bddb76ecc72129cc1dbd32030073dfd SHA1 (patch-ak) = ab4d0c91a6f2806b405954f8dab6e3d61a03b054 -SHA1 (patch-ca) = ba4190663bc0c0e9a7d9477922665e0ed5d4c0e4 +SHA1 (patch-ba) = c53d76e13dc7afeb9410f4566ea917b83a76a133 +SHA1 (patch-bb) = c9fa8638988e335f9d80cda25015d9a18d78fa94 +SHA1 (patch-ca) = 5bd31c497c8cbfb6c1d6cb5b9183088113bef6e3 SHA1 (patch-cb) = e8cfb16a0641788759b13cf5fcf97d82f9485adc diff --git a/print/poppler/patches/patch-ba b/print/poppler/patches/patch-ba new file mode 100644 index 00000000000..587619b2cec --- /dev/null +++ b/print/poppler/patches/patch-ba @@ -0,0 +1,13 @@ +$NetBSD: patch-ba,v 1.1 2009/02/26 20:23:02 drochner Exp $ + +--- poppler/CairoOutputDev.cc.orig 2009-02-24 15:34:03.000000000 +0100 ++++ poppler/CairoOutputDev.cc +@@ -236,7 +236,7 @@ void CairoOutputDev::setDefaultCTM(doubl + matrix.y0 = ctm[5]; + + cairo_transform (cairo, &matrix); +- if (shape) ++ if (cairo_shape) + cairo_transform (cairo_shape, &matrix); + + OutputDev::setDefaultCTM(ctm); diff --git a/print/poppler/patches/patch-bb b/print/poppler/patches/patch-bb new file mode 100644 index 00000000000..17494409b35 --- /dev/null +++ b/print/poppler/patches/patch-bb @@ -0,0 +1,197 @@ +$NetBSD: patch-bb,v 1.1 2009/02/26 20:23:02 drochner Exp $ + +--- poppler/JBIG2Stream.cc.orig 2009-01-23 23:09:41.000000000 +0100 ++++ poppler/JBIG2Stream.cc +@@ -684,6 +684,7 @@ public: + void combine(JBIG2Bitmap *bitmap, int x, int y, Guint combOp); + Guchar *getDataPtr() { return data; } + int getDataSize() { return h * line; } ++ GBool isOk() { return data != NULL; } + + private: + +@@ -2074,18 +2075,20 @@ void JBIG2Stream::readTextRegionSeg(Guin + + gfree(syms); + +- // combine the region bitmap into the page bitmap +- if (imm) { +- if (pageH == 0xffffffff && y + h > curPageH) { +- pageBitmap->expand(y + h, pageDefPixel); +- } +- pageBitmap->combine(bitmap, x, y, extCombOp); +- delete bitmap; ++ if (bitmap) { ++ // combine the region bitmap into the page bitmap ++ if (imm) { ++ if (pageH == 0xffffffff && y + h > curPageH) { ++ pageBitmap->expand(y + h, pageDefPixel); ++ } ++ pageBitmap->combine(bitmap, x, y, extCombOp); ++ delete bitmap; + +- // store the region bitmap +- } else { +- bitmap->setSegNum(segNum); +- segments->append(bitmap); ++ // store the region bitmap ++ } else { ++ bitmap->setSegNum(segNum); ++ segments->append(bitmap); ++ } + } + + // clean up the Huffman decoder +@@ -2207,73 +2210,84 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion + ri = 0; + } + if (ri) { ++ GBool decodeSuccess; + if (huff) { +- huffDecoder->decodeInt(&rdw, huffRDWTable); +- huffDecoder->decodeInt(&rdh, huffRDHTable); +- huffDecoder->decodeInt(&rdx, huffRDXTable); +- huffDecoder->decodeInt(&rdy, huffRDYTable); +- huffDecoder->decodeInt(&bmSize, huffRSizeTable); ++ decodeSuccess = huffDecoder->decodeInt(&rdw, huffRDWTable); ++ decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&rdh, huffRDHTable); ++ decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&rdx, huffRDXTable); ++ decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&rdy, huffRDYTable); ++ decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&bmSize, huffRSizeTable); + huffDecoder->reset(); + arithDecoder->start(); + } else { +- arithDecoder->decodeInt(&rdw, iardwStats); +- arithDecoder->decodeInt(&rdh, iardhStats); +- arithDecoder->decodeInt(&rdx, iardxStats); +- arithDecoder->decodeInt(&rdy, iardyStats); +- } +- refDX = ((rdw >= 0) ? rdw : rdw - 1) / 2 + rdx; +- refDY = ((rdh >= 0) ? rdh : rdh - 1) / 2 + rdy; +- +- symbolBitmap = +- readGenericRefinementRegion(rdw + syms[symID]->getWidth(), +- rdh + syms[symID]->getHeight(), +- templ, gFalse, syms[symID], +- refDX, refDY, atx, aty); ++ decodeSuccess = arithDecoder->decodeInt(&rdw, iardwStats); ++ decodeSuccess = decodeSuccess && arithDecoder->decodeInt(&rdh, iardhStats); ++ decodeSuccess = decodeSuccess && arithDecoder->decodeInt(&rdx, iardxStats); ++ decodeSuccess = decodeSuccess && arithDecoder->decodeInt(&rdy, iardyStats); ++ } ++ ++ if (decodeSuccess) ++ { ++ refDX = ((rdw >= 0) ? rdw : rdw - 1) / 2 + rdx; ++ refDY = ((rdh >= 0) ? rdh : rdh - 1) / 2 + rdy; ++ ++ symbolBitmap = ++ readGenericRefinementRegion(rdw + syms[symID]->getWidth(), ++ rdh + syms[symID]->getHeight(), ++ templ, gFalse, syms[symID], ++ refDX, refDY, atx, aty); ++ } + //~ do we need to use the bmSize value here (in Huffman mode)? + } else { + symbolBitmap = syms[symID]; + } + +- // combine the symbol bitmap into the region bitmap +- //~ something is wrong here - refCorner shouldn't degenerate into +- //~ two cases +- bw = symbolBitmap->getWidth() - 1; +- bh = symbolBitmap->getHeight() - 1; +- if (transposed) { +- switch (refCorner) { +- case 0: // bottom left +- bitmap->combine(symbolBitmap, tt, s, combOp); +- break; +- case 1: // top left +- bitmap->combine(symbolBitmap, tt, s, combOp); +- break; +- case 2: // bottom right +- bitmap->combine(symbolBitmap, tt - bw, s, combOp); +- break; +- case 3: // top right +- bitmap->combine(symbolBitmap, tt - bw, s, combOp); +- break; ++ if (symbolBitmap) { ++ // combine the symbol bitmap into the region bitmap ++ //~ something is wrong here - refCorner shouldn't degenerate into ++ //~ two cases ++ bw = symbolBitmap->getWidth() - 1; ++ bh = symbolBitmap->getHeight() - 1; ++ if (transposed) { ++ switch (refCorner) { ++ case 0: // bottom left ++ bitmap->combine(symbolBitmap, tt, s, combOp); ++ break; ++ case 1: // top left ++ bitmap->combine(symbolBitmap, tt, s, combOp); ++ break; ++ case 2: // bottom right ++ bitmap->combine(symbolBitmap, tt - bw, s, combOp); ++ break; ++ case 3: // top right ++ bitmap->combine(symbolBitmap, tt - bw, s, combOp); ++ break; ++ } ++ s += bh; ++ } else { ++ switch (refCorner) { ++ case 0: // bottom left ++ bitmap->combine(symbolBitmap, s, tt - bh, combOp); ++ break; ++ case 1: // top left ++ bitmap->combine(symbolBitmap, s, tt, combOp); ++ break; ++ case 2: // bottom right ++ bitmap->combine(symbolBitmap, s, tt - bh, combOp); ++ break; ++ case 3: // top right ++ bitmap->combine(symbolBitmap, s, tt, combOp); ++ break; ++ } ++ s += bw; + } +- s += bh; +- } else { +- switch (refCorner) { +- case 0: // bottom left +- bitmap->combine(symbolBitmap, s, tt - bh, combOp); +- break; +- case 1: // top left +- bitmap->combine(symbolBitmap, s, tt, combOp); +- break; +- case 2: // bottom right +- bitmap->combine(symbolBitmap, s, tt - bh, combOp); +- break; +- case 3: // top right +- bitmap->combine(symbolBitmap, s, tt, combOp); +- break; ++ if (ri) { ++ delete symbolBitmap; + } +- s += bw; +- } +- if (ri) { +- delete symbolBitmap; ++ } else { ++ // NULL symbolBitmap only happens on error ++ delete bitmap; ++ return NULL; + } + } + +@@ -3052,6 +3066,11 @@ JBIG2Bitmap *JBIG2Stream::readGenericRef + int x, y, pix; + + bitmap = new JBIG2Bitmap(0, w, h); ++ if (!bitmap->isOk()) ++ { ++ delete bitmap; ++ return NULL; ++ } + bitmap->clearToZero(); + + // set up the typical row context diff --git a/print/poppler/patches/patch-ca b/print/poppler/patches/patch-ca index 754edf199e5..eae526f2d0a 100644 --- a/print/poppler/patches/patch-ca +++ b/print/poppler/patches/patch-ca @@ -1,4 +1,4 @@ -$NetBSD: patch-ca,v 1.1 2009/02/12 20:55:07 drochner Exp $ +$NetBSD: patch-ca,v 1.2 2009/02/26 20:23:02 drochner Exp $ --- poppler/GfxState.cc.orig 2008-11-05 22:49:26.000000000 +0100 +++ poppler/GfxState.cc @@ -912,7 +912,7 @@ $NetBSD: patch-ca,v 1.1 2009/02/12 20:55:07 drochner Exp $ + if (cache[GFX_ICCBASED_CACHE_SIZE-1].num > 0) { + delete cache[GFX_ICCBASED_CACHE_SIZE-1].colorSpace; + } -+ for (i = GFX_ICCBASED_CACHE_SIZE; i > 0; i--) { ++ for (i = GFX_ICCBASED_CACHE_SIZE-1; i > 0; i--) { + if (cache[i - 1].num > 0) cache[i] = cache[i - 1]; + } + cache[0].num = numA; |