poppler/SplashOutputDev.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
New commits: commit a766740cf5a5a7580935a026bf15fbd668aa0fdf Author: Thomas Freitag <[email protected]> Date: Fri Mar 1 19:12:22 2013 +0100 Restore CTM on early exits Bug #61413 diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc index 6f2d4d6..0426b18 100644 --- a/poppler/SplashOutputDev.cc +++ b/poppler/SplashOutputDev.cc @@ -20,7 +20,7 @@ // Copyright (C) 2006 Scott Turner <[email protected]> // Copyright (C) 2007 Koji Otani <[email protected]> // Copyright (C) 2009 Petr Gajdos <[email protected]> -// Copyright (C) 2009-2012 Thomas Freitag <[email protected]> +// Copyright (C) 2009-2013 Thomas Freitag <[email protected]> // Copyright (C) 2009 Carlos Garcia Campos <[email protected]> // Copyright (C) 2009 William Bader <[email protected]> // Copyright (C) 2010 Patrick Spendrin <[email protected]> @@ -4109,8 +4109,10 @@ GBool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx1, Catalog *ca state->concatCTM(1, 0, 0, 1, bbox[0], bbox[1]); ctm = state->getCTM(); for (i = 0; i < 6; ++i) { - if (!isfinite(ctm[i])) + if (!isfinite(ctm[i])) { + state->setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], savedCTM[4], savedCTM[5]); return gFalse; + } } matc[4] = x0 * xStep * ctm[0] + y0 * yStep * ctm[2] + ctm[4]; matc[5] = x0 * xStep * ctm[1] + y0 * yStep * ctm[3] + ctm[5]; @@ -4152,8 +4154,10 @@ GBool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx1, Catalog *ca repeatX = x1 - x0; repeatY = y1 - y0; } else { - if ((unsigned long) result_width * result_height > 0x800000L) + 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; @@ -4184,8 +4188,10 @@ GBool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx1, Catalog *ca matc[2] = ctm[2]; matc[3] = ctm[3]; - if (surface_width == 0 || surface_height == 0) + if (surface_width == 0 || surface_height == 0) { + state->setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], savedCTM[4], savedCTM[5]); return gFalse; + } m1.transform(bbox[0], bbox[1], &kx, &ky); m1.m[4] = -kx; m1.m[5] = -ky; _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
