From 3b9d8025dbdfcfac94ede20b05d86d177393cde7 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Fri, 25 May 2018 17:26:37 +0200 Subject: Splash: Fix another potential uninitialized memory use fixes oss-fuzz/8466 --- splash/Splash.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'splash') diff --git a/splash/Splash.cc b/splash/Splash.cc index d493b22d..93eef341 100644 --- a/splash/Splash.cc +++ b/splash/Splash.cc @@ -4619,8 +4619,10 @@ void Splash::scaleImageYuXd(SplashImageSource src, void *srcData, // allocate buffers lineBuf = (Guchar *)gmallocn_checkoverflow(srcWidth, nComps); - if (unlikely(!lineBuf)) + if (unlikely(!lineBuf)) { + gfree(dest->takeData()); return; + } if (srcAlpha) { alphaLineBuf = (Guchar *)gmalloc(srcWidth); } else { @@ -5100,7 +5102,7 @@ void Splash::blitImage(SplashBitmap *src, GBool srcAlpha, int xDest, int yDest) void Splash::blitImage(SplashBitmap *src, GBool srcAlpha, int xDest, int yDest, SplashClipResult clipRes) { SplashPipe pipe; - SplashColor pixel; + SplashColor pixel = {}; Guchar *ap; int w, h, x0, y0, x1, y1, x, y; -- cgit v1.2.3