diff options
Diffstat (limited to 'splash')
-rw-r--r-- | splash/Splash.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/splash/Splash.cc b/splash/Splash.cc index bc7d79ff..ccfe1ed6 100644 --- a/splash/Splash.cc +++ b/splash/Splash.cc @@ -4504,7 +4504,9 @@ void Splash::scaleImageYuXd(SplashImageSource src, void *srcData, xq = srcWidth % scaledWidth; // allocate buffers - lineBuf = (Guchar *)gmallocn(srcWidth, nComps); + lineBuf = (Guchar *)gmallocn_checkoverflow(srcWidth, nComps); + if (unlikely(!lineBuf)) + return; if (srcAlpha) { alphaLineBuf = (Guchar *)gmalloc(srcWidth); } else { |