summaryrefslogtreecommitdiff
authorAlbert Astals Cid <aacid@kde.org>2013-01-10 18:16:19 (GMT)
committer Albert Astals Cid <aacid@kde.org>2013-01-10 18:16:19 (GMT)
commit957aa252912cde85d76c41e9710b33425a82b696 (patch) (side-by-side diff)
tree60624d4197489cca49e3f8433fd57ec29eaaadfd
parentbbc2d8918fe234b7ef2c480eb148943922cc0959 (diff)
downloadpoppler-957aa252912cde85d76c41e9710b33425a82b696.zip
poppler-957aa252912cde85d76c41e9710b33425a82b696.tar.gz
Fix invalid memory accesses in 1091.pdf.asan.72.42
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--splash/Splash.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/splash/Splash.cc b/splash/Splash.cc
index 1f838af..af609b4 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