poppler/Gfx.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit d8346166d5150c1673379dcb3c658b9805f99764 Author: Albert Astals Cid <aa...@kde.org> Date: Mon Jul 2 20:10:25 2018 +0200 Gfx::doRadialShFill: Don't divide by zero fixes oss-fuzz/9133 diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc index 0763e49f..8f2c62d2 100644 --- a/poppler/Gfx.cc +++ b/poppler/Gfx.cc @@ -3048,7 +3048,11 @@ void Gfx::doRadialShFill(GfxRadialShading *shading) { if (t < 1) { n = 3; } else { - n = (int)(M_PI / acos(1 - 0.1 / t)); + const double tmp = 1 - 0.1 / t; + if (unlikely(tmp == 1)) + n = 200; + else + n = (int)(M_PI / acos(tmp)); if (n < 3) { n = 3; } else if (n > 200) { _______________________________________________ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler