From: Cristy Date: Sat, 17 Mar 2018 10:46:14 +0000 (-0400) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6978 X-Git-Tag: 7.0.7-27~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4480db22943d56111517e8f90ece5d1fafbf2c4;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6978 --- diff --git a/MagickCore/draw.c b/MagickCore/draw.c index a518c3654..c47fc0f98 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -1681,7 +1681,7 @@ static size_t EllipsePoints(const PrimitiveInfo *primitive_info, delta=2.0/MagickMax(stop.x,stop.y); step=MagickPI/8.0; if ((delta >= 0.0) && (delta < (MagickPI/8.0))) - step=MagickPI/(4*(MagickPI/delta/2+0.5)); + step=MagickPI/(4*(MagickPI*PerceptibleReciprocal(delta)/2.0+0.5)); if (step < 0.00001) step=0.00001; angle.x=DegreesToRadians(degrees.x); @@ -5508,7 +5508,7 @@ static void TraceEllipse(PrimitiveInfo *primitive_info,const PointInfo start, delta=2.0/MagickMax(stop.x,stop.y); step=MagickPI/8.0; if ((delta >= 0.0) && (delta < (MagickPI/8.0))) - step=MagickPI/(4*(MagickPI/delta/2+0.5)); + step=MagickPI/(4*(MagickPI*PerceptibleReciprocal(delta)/2.0+0.5)); if (step < 0.00001) step=0.00001; angle.x=DegreesToRadians(degrees.x);