From: Cristy Date: Thu, 7 Jun 2018 22:43:40 +0000 (-0400) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8772 X-Git-Tag: 7.0.7-39~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f9b981cf17949c5692586619b82e62e96649978;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8772 --- 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);