poppler/Gfx.cc | 3 +++ 1 file changed, 3 insertions(+) New commits: commit 6e7cbc713ae584d195f77845d6cafcdc80fb64ab Author: Albert Astals Cid <aa...@kde.org> Date: Sat Dec 22 11:11:59 2018 +0100
Gfx::doTilingPatternFill: Fix undefined behaviour oss-fuzz/8548 diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc index 2b53ea07..8dc2dc93 100644 --- a/poppler/Gfx.cc +++ b/poppler/Gfx.cc @@ -2187,6 +2187,9 @@ void Gfx::doTilingPatternFill(GfxTilingPattern *tPat, //~ edge instead of left/bottom (?) xstep = fabs(tPat->getXStep()); ystep = fabs(tPat->getYStep()); + if (unlikely(xstep == 0 || ystep == 0)) { + goto restore; + } if (tPat->getBBox()[0] < tPat->getBBox()[2]) { xi0 = (int)ceil((xMin - tPat->getBBox()[2]) / xstep); xi1 = (int)floor((xMax - tPat->getBBox()[0]) / xstep) + 1; _______________________________________________ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler