diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc index d2827d1..934c91c 100644 --- a/poppler/SplashOutputDev.cc +++ b/poppler/SplashOutputDev.cc @@ -4481,10 +4481,6 @@ GBool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *ca repeatX = x1 - x0; repeatY = y1 - y0; } else { - if ((unsigned long) result_width * result_height > 0x800000L) { - state->setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], savedCTM[4], savedCTM[5]); - return gFalse; - } while(fabs(kx) > 16384 || fabs(ky) > 16384) { // limit pattern bitmap size m1.m[0] /= 2; @@ -4525,6 +4521,10 @@ GBool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *ca bitmap = new SplashBitmap(surface_width, surface_height, 1, (paintType == 1) ? colorMode : splashModeMono8, gTrue); + if (bitmap->getDataPtr() == NULL) { + state->setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], savedCTM[4], savedCTM[5]); + return gFalse; + } splash = new Splash(bitmap, gTrue); if (paintType == 2) { SplashColor clearColor;