Commit 8ff1bddc authored by Albert Astals Cid's avatar Albert Astals Cid

Splash::scaleImageYdXd: gmallocn -> gmallocn_checkoverflow

oss-fuzz/10205
parent cf25cd0c
......@@ -4244,7 +4244,11 @@ void Splash::scaleImageYdXd(SplashImageSource src, void *srcData,
// allocate buffers
lineBuf = (Guchar *)gmallocn(srcWidth, nComps);
pixBuf = (Guint *)gmallocn(srcWidth, nComps * sizeof(int));
pixBuf = (Guint *)gmallocn_checkoverflow(srcWidth, nComps * sizeof(int));
if (unlikely(!pixBuf)) {
gfree(lineBuf);
return;
}
if (srcAlpha) {
alphaLineBuf = (Guchar *)gmalloc(srcWidth);
alphaPixBuf = (Guint *)gmallocn(srcWidth, sizeof(int));
......
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