poppler/GfxState.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit b5db021a71e38d56079cbcfcaf3345765e9ed782 Author: Albert Astals Cid <aa...@kde.org> Date: Thu Sep 20 23:10:55 2018 +0200 GfxUnivariateShading::setupCache: gmallocn -> gmallocn_checkoverflow oss-fuzz/10508 diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc index c2ff6d02..b8423f23 100644 --- a/poppler/GfxState.cc +++ b/poppler/GfxState.cc @@ -4008,7 +4008,9 @@ void GfxUnivariateShading::setupCache(const Matrix *ctm, tMax = t0 + sMin * (t1 - t0); } - cacheBounds = (double *)gmallocn(maxSize, sizeof(double) * (nComps + 2)); + cacheBounds = (double *)gmallocn_checkoverflow(maxSize, sizeof(double) * (nComps + 2)); + if (unlikely(!cacheBounds)) + return; cacheCoeff = cacheBounds + maxSize; cacheValues = cacheCoeff + maxSize; _______________________________________________ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler