summaryrefslogtreecommitdiff
path: root/splash
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2013-03-04 20:12:01 +0100
committerAlbert Astals Cid <aacid@kde.org>2013-03-04 20:12:01 +0100
commit4e142b60790638e4495b4fd6551702470cf4c38f (patch)
tree25648b54d5424e1a4c7e61e875edb8d9bd314efd /splash
parenta766740cf5a5a7580935a026bf15fbd668aa0fdf (diff)
Make sure we don't try to paint in x < 0
Fixes crash in KDE bug #315432
Diffstat (limited to 'splash')
-rw-r--r--splash/Splash.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/splash/Splash.cc b/splash/Splash.cc
index 3d80c4c8..cd0ec72f 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -3927,6 +3927,8 @@ SplashError Splash::arbitraryTransformImage(SplashImageSource src, void *srcData
xa = imgCoordMungeLower(section[i].xa0 +
((SplashCoord)y + 0.5 - section[i].ya0) *
section[i].dxdya);
+ if (unlikely(xa < 0))
+ xa = 0;
xb = imgCoordMungeUpper(section[i].xb0 +
((SplashCoord)y + 0.5 - section[i].yb0) *
section[i].dxdyb);