poppler/Annot.cc | 7 +++++-- poppler/JBIG2Stream.cc | 11 ++++++++--- poppler/SplashOutputDev.cc | 6 ++++++ 3 files changed, 19 insertions(+), 5 deletions(-)
New commits: commit fd49b3d4ecdbe04c4f51e6ab77687dc25bbc3f49 Author: Albert Astals Cid <[email protected]> Date: Fri Sep 25 00:45:55 2015 +0200 Fix crash on Annot::layoutText for malformed documents diff --git a/poppler/Annot.cc b/poppler/Annot.cc index 29f3621..f3f479c 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -4052,6 +4052,9 @@ void Annot::layoutText(GooString *text, GooString *outBuf, int *i, double w = 0.0; int uLen, n; double dx, dy, ox, oy; + if (!text) { + return; + } GBool unicode = text->hasUnicodeMarker(); GBool spacePrev; // previous character was a space commit a88be71fee8a4fd8e9a5a1d9d955addc0f3076ea Author: Albert Astals Cid <[email protected]> Date: Fri Sep 25 00:42:14 2015 +0200 Fix crash in SplashOutputDev::beginTransparencyGroup in malformed file diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc index 7759382..d19c25d 100644 --- a/poppler/SplashOutputDev.cc +++ b/poppler/SplashOutputDev.cc @@ -4091,6 +4091,12 @@ void SplashOutputDev::beginTransparencyGroup(GfxState *state, double *bbox, // create the temporary bitmap bitmap = new SplashBitmap(w, h, bitmapRowPad, colorMode, gTrue, bitmapTopDown, bitmap->getSeparationList()); + if (!bitmap->getDataPtr()) { + delete bitmap; + w = h = 1; + bitmap = new SplashBitmap(w, h, bitmapRowPad, colorMode, + colorMode != splashModeMono1, bitmapTopDown); + } splash = new Splash(bitmap, vectorAntialias, transpGroup->origSplash->getScreen()); if (transpGroup->next != NULL && transpGroup->next->knockout) { commit 0fa5c17ea409c3fdfe1e3a97ff5e4bae96da1cae Author: Albert Astals Cid <[email protected]> Date: Fri Sep 25 00:36:33 2015 +0200 Fix crash on JBIG2Stream::readHalftoneRegionSeg for malformed documents diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc index 66c1d25..a20c220 100644 --- a/poppler/JBIG2Stream.cc +++ b/poppler/JBIG2Stream.cc @@ -15,7 +15,7 @@ // // Copyright (C) 2006 Raj Kumar <[email protected]> // Copyright (C) 2006 Paul Walmsley <[email protected]> -// Copyright (C) 2006-2010, 2012, 2014 Albert Astals Cid <[email protected]> +// Copyright (C) 2006-2010, 2012, 2014, 2015 Albert Astals Cid <[email protected]> // Copyright (C) 2009 David Benjamin <[email protected]> // Copyright (C) 2011 Edward Jiang <[email protected]> // Copyright (C) 2012 William Bader <[email protected]> @@ -2701,8 +2701,13 @@ void JBIG2Stream::readHalftoneRegionSeg(Guint segNum, GBool imm, i >>= 1; } } - patW = patternDict->getBitmap(0)->getWidth(); - patH = patternDict->getBitmap(0)->getHeight(); + patternBitmap = patternDict->getBitmap(0); + if (unlikely(patternBitmap == NULL)) { + error(errSyntaxError, curStr->getPos(), "Bad pattern bitmap"); + return; + } + patW = patternBitmap->getWidth(); + patH = patternBitmap->getHeight(); // set up the arithmetic decoder if (!mmr) { commit 942adfc25e7a00ac3cf032ced2d8949e99099f70 Author: Albert Astals Cid <[email protected]> Date: Fri Sep 25 00:30:58 2015 +0200 Fix crash on AnnotInk::draw for malformed documents diff --git a/poppler/Annot.cc b/poppler/Annot.cc index 85a8ac4..29f3621 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -15,7 +15,7 @@ // // Copyright (C) 2006 Scott Turner <[email protected]> // Copyright (C) 2007, 2008 Julien Rebetez <[email protected]> -// Copyright (C) 2007-2013 Albert Astals Cid <[email protected]> +// Copyright (C) 2007-2013, 2015 Albert Astals Cid <[email protected]> // Copyright (C) 2007-2013 Carlos Garcia Campos <[email protected]> // Copyright (C) 2007, 2008 Iñigo MartÃnez <[email protected]> // Copyright (C) 2007 Jeff Muizelaar <[email protected]> @@ -6151,7 +6151,7 @@ void AnnotInk::draw(Gfx *gfx, GBool printing) { for (int i = 0; i < inkListLength; ++i) { const AnnotPath * path = inkList[i]; - if (path->getCoordsLength() != 0) { + if (path && path->getCoordsLength() != 0) { appearBuf->appendf ("{0:.2f} {1:.2f} m\n", path->getX(0) - rect->x1, path->getY(0) - rect->y1); appearBBox->extendTo (path->getX(0) - rect->x1, path->getY(0) - rect->y1);
_______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
