From 957aa252912cde85d76c41e9710b33425a82b696 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Thu, 10 Jan 2013 19:16:19 +0100 Subject: Fix invalid memory accesses in 1091.pdf.asan.72.42 --- splash/Splash.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'splash') 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 -- cgit v1.2.3