[poppler] poppler/SplashOutputDev.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Thu Sep 24 15:53:54 PDT 2015
poppler/SplashOutputDev.cc | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit b723e4f90c78ac972bf30d7006283042930374d7
Author: Albert Astals Cid <aacid at kde.org>
Date: Fri Sep 25 00:53:10 2015 +0200
Fix crash in malformed document in SplashOutputDev::drawMaskedImage
And improved the one i just did for SplashOutputDev::beginTransparencyGroup
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index d19c25d..fbf4d08 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -3684,6 +3684,11 @@ void SplashOutputDev::drawMaskedImage(GfxState *state, Object *ref,
imgMaskData.height = maskHeight;
imgMaskData.y = 0;
maskBitmap = new SplashBitmap(width, height, 1, splashModeMono1, gFalse);
+ if (!maskBitmap->getDataPtr()) {
+ delete maskBitmap;
+ width = height = 1;
+ maskBitmap = new SplashBitmap(width, height, 1, splashModeMono1, gFalse);
+ }
maskSplash = new Splash(maskBitmap, gFalse);
maskColor[0] = 0;
maskSplash->clear(maskColor);
@@ -4094,8 +4099,8 @@ void SplashOutputDev::beginTransparencyGroup(GfxState *state, double *bbox,
if (!bitmap->getDataPtr()) {
delete bitmap;
w = h = 1;
- bitmap = new SplashBitmap(w, h, bitmapRowPad, colorMode,
- colorMode != splashModeMono1, bitmapTopDown);
+ bitmap = new SplashBitmap(w, h, bitmapRowPad, colorMode, gTrue,
+ bitmapTopDown, bitmap->getSeparationList());
}
splash = new Splash(bitmap, vectorAntialias,
transpGroup->origSplash->getScreen());
More information about the poppler
mailing list