summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2022-12-02 22:55:51 +0100
committerAlbert Astals Cid <aacid@kde.org>2022-12-02 22:55:51 +0100
commit2944c16a1ac7da0aaf9cb351ff664585968d8356 (patch)
treedf36657391e8e0c63bd444aa6c94f432e4d3bdd0
parent54c93aade58b60699c0bf2c7962c274b6e6f7772 (diff)
Fix crash on broken documents
Issue #1320
-rw-r--r--splash/Splash.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/splash/Splash.cc b/splash/Splash.cc
index 05f000d9..0dbd0c0e 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -3892,6 +3892,9 @@ SplashError Splash::arbitraryTransformImage(SplashImageSource src, SplashICCTran
if (xa == xb) {
++xb;
}
+ if (unlikely(clipRes == splashClipAllInside && xb > bitmap->getWidth())) {
+ xb = bitmap->getWidth();
+ }
if (clipRes != splashClipAllInside) {
clipRes2 = state->clip->testSpan(xa, xb - 1, y);
} else {