summaryrefslogtreecommitdiff
path: root/splash
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2013-01-10 19:16:19 +0100
committerAlbert Astals Cid <aacid@kde.org>2013-01-10 19:16:19 +0100
commit957aa252912cde85d76c41e9710b33425a82b696 (patch)
tree60624d4197489cca49e3f8433fd57ec29eaaadfd /splash
parentbbc2d8918fe234b7ef2c480eb148943922cc0959 (diff)
Fix invalid memory accesses in 1091.pdf.asan.72.42
Diffstat (limited to 'splash')
-rw-r--r--splash/Splash.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/splash/Splash.cc b/splash/Splash.cc
index 1f838afb..af609b46 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -3233,6 +3233,12 @@ void Splash::scaleMaskYdXu(SplashImageMaskSource src, void *srcData,
Guchar *destPtr;
int yp, yq, xp, xq, yt, y, yStep, xt, x, xStep, d;
int i, j;
+
+ destPtr = dest->data;
+ if (destPtr == NULL) {
+ error(errInternal, -1, "dest->data is NULL in Splash::scaleMaskYdXu");
+ return;
+ }
// Bresenham parameters for y scale
yp = srcHeight / scaledHeight;
@@ -3249,7 +3255,6 @@ void Splash::scaleMaskYdXu(SplashImageMaskSource src, void *srcData,
// init y scale Bresenham
yt = 0;
- destPtr = dest->data;
for (y = 0; y < scaledHeight; ++y) {
// y scale Bresenham