From 1f9b981cf17949c5692586619b82e62e96649978 Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 7 Jun 2018 18:43:40 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8772 --- MagickCore/draw.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 7df881762..9ba669d6b 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -6222,7 +6222,10 @@ static size_t TracePath(MVGInfo *mvg_info,const char *path, GetNextToken(p,&p,MagickPathExtent,token); if (*token == ',') GetNextToken(p,&p,MagickPathExtent,token); - sweep=StringToLong(token) != 0 ? MagickTrue : MagickFalse; + sweep=fabs(StringToDouble(token&next_token)) < DrawEpsilon ? + MagickFalse : MagickTrue; + if (token == next_token) + ThrowPointExpectedException(token,exception); GetNextToken(p,&p,MagickPathExtent,token); if (*token == ',') GetNextToken(p,&p,MagickPathExtent,token); -- 2.40.0