From c7b86e652939f1d67f74a5a031506f0c5386472e Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 12 Apr 2018 20:14:59 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7633 --- MagickCore/draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MagickCore/draw.c b/MagickCore/draw.c index ae8eece74..b8884bf59 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -1571,7 +1571,8 @@ static MagickBooleanType DrawDashPolygon(const DrawInfo *draw_info, dx=primitive_info[i].point.x-primitive_info[i-1].point.x; dy=primitive_info[i].point.y-primitive_info[i-1].point.y; maximum_length=hypot(dx,dy); - if (maximum_length > MaxBezierCoordinates) + if ((fabs(maximum_length) < DrawEpsilon) || + (maximum_length > MaxBezierCoordinates)) break; if (fabs(length) < DrawEpsilon) { -- 2.40.0