[poppler] splash/Splash.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Fri May 25 15:27:18 UTC 2018


 splash/Splash.cc |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 3b9d8025dbdfcfac94ede20b05d86d177393cde7
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri May 25 17:26:37 2018 +0200

    Splash: Fix another potential uninitialized memory use
    
    fixes oss-fuzz/8466

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;
 


More information about the poppler mailing list