diff options
author | Albert Astals Cid <aacid@kde.org> | 2018-05-25 17:26:37 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2018-05-25 17:26:37 +0200 |
commit | 3b9d8025dbdfcfac94ede20b05d86d177393cde7 (patch) | |
tree | fc7cf29f1c551a2967f8e02027280a2613080455 /splash | |
parent | 0e3b18a48c3907a49c51a0ceded6078a2fd790eb (diff) |
Splash: Fix another potential uninitialized memory use
fixes oss-fuzz/8466
Diffstat (limited to 'splash')
-rw-r--r-- | splash/Splash.cc | 6 |
1 files changed, 4 insertions, 2 deletions
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; |