Commit 681f52a5 authored by Albert Astals Cid's avatar Albert Astals Cid

Fix exit(1) in 1026.asan.0.42.pdf

The main crash in discussion with Thomas
parent 9f4d7796
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment