Blame SOURCES/poppler-0.66.0-tilingpatternfill-crash.patch
|
|
fb0f56 |
From b224e2f5739fe61de9fa69955d016725b2a4b78d Mon Sep 17 00:00:00 2001
|
|
|
fb0f56 |
From: Albert Astals Cid <aacid@kde.org>
|
|
|
fb0f56 |
Date: Mon, 15 Jul 2019 22:11:09 +0200
|
|
|
fb0f56 |
Subject: [PATCH] SplashOutputDev::tilingPatternFill: Fix crash on broken file
|
|
|
fb0f56 |
|
|
|
fb0f56 |
Issue #802
|
|
|
fb0f56 |
---
|
|
|
fb0f56 |
poppler/SplashOutputDev.cc | 4 ++++
|
|
|
fb0f56 |
1 file changed, 4 insertions(+)
|
|
|
fb0f56 |
|
|
|
fb0f56 |
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
|
|
|
fb0f56 |
index 544f132d..3d2befc2 100644
|
|
|
fb0f56 |
--- a/poppler/SplashOutputDev.cc
|
|
|
fb0f56 |
+++ b/poppler/SplashOutputDev.cc
|
|
|
fb0f56 |
@@ -4581,6 +4581,10 @@ bool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat
|
|
|
fb0f56 |
surface_width = (int) ceil (fabs(kx));
|
|
|
fb0f56 |
surface_height = (int) ceil (fabs(ky));
|
|
|
fb0f56 |
// adjust repeat values to completely fill region
|
|
|
fb0f56 |
+ if (unlikely(surface_width == 0 || surface_height == 0)) {
|
|
|
fb0f56 |
+ state->setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], savedCTM[4], savedCTM[5]);
|
|
|
fb0f56 |
+ return gFalse;
|
|
|
fb0f56 |
+ }
|
|
|
fb0f56 |
repeatX = result_width / surface_width;
|
|
|
fb0f56 |
repeatY = result_height / surface_height;
|
|
|
fb0f56 |
if (surface_width * repeatX < result_width)
|
|
|
fb0f56 |
--
|
|
|
fb0f56 |
2.24.1
|
|
|
fb0f56 |
|