summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2013-01-10 22:31:52 +0100
committerAlbert Astals Cid <aacid@kde.org>2013-01-10 22:31:52 +0100
commit8b6dc55e530b2f5ede6b9dfb64aafdd1d5836492 (patch)
treee413de926cc19171d5f74ca4ab25ddfbee6a571f
parente14b6e9c13d35c9bd1e0c50906ace8e707816888 (diff)
Fix invalid memory access in 1150.pdf.asan.8.69
-rw-r--r--splash/Splash.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/splash/Splash.cc b/splash/Splash.cc
index af609b46..d0d986ef 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -2254,3 +2254,3 @@ SplashPath *Splash::makeDashedPath(SplashPath *path) {
if (lineDashStartPhase > 0) {
- while (lineDashStartPhase >= state->lineDash[lineDashStartIdx]) {
+ while (lineDashStartIdx < state->lineDashLength && lineDashStartPhase >= state->lineDash[lineDashStartIdx]) {
lineDashStartOn = !lineDashStartOn;
@@ -2259,2 +2259,5 @@ SplashPath *Splash::makeDashedPath(SplashPath *path) {
}
+ if (unlikely(lineDashStartIdx == state->lineDashLength)) {
+ return new SplashPath();
+ }
}