[poppler] Branch 'poppler-0.22' - splash/Splash.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Jan 10 13:32:08 PST 2013


 splash/Splash.cc |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 8b6dc55e530b2f5ede6b9dfb64aafdd1d5836492
Author: Albert Astals Cid <aacid at kde.org>
Date:   Thu Jan 10 22:31:52 2013 +0100

    Fix invalid memory access in 1150.pdf.asan.8.69

diff --git a/splash/Splash.cc b/splash/Splash.cc
index af609b4..d0d986e 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -2252,11 +2252,14 @@ SplashPath *Splash::makeDashedPath(SplashPath *path) {
   lineDashStartOn = gTrue;
   lineDashStartIdx = 0;
   if (lineDashStartPhase > 0) {
-    while (lineDashStartPhase >= state->lineDash[lineDashStartIdx]) {
+    while (lineDashStartIdx < state->lineDashLength && lineDashStartPhase >= state->lineDash[lineDashStartIdx]) {
       lineDashStartOn = !lineDashStartOn;
       lineDashStartPhase -= state->lineDash[lineDashStartIdx];
       ++lineDashStartIdx;
     }
+    if (unlikely(lineDashStartIdx == state->lineDashLength)) {
+      return new SplashPath();
+    }
   }
 
   dPath = new SplashPath();


More information about the poppler mailing list