From: Cristy Date: Fri, 23 Mar 2018 00:33:58 +0000 (-0400) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7071 X-Git-Tag: 7.0.7-28~48 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4fc6fc13832a0ab0037040cc951ace96b240eb22;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7071 --- diff --git a/MagickCore/fx.c b/MagickCore/fx.c index 6d01bbb4a..1dcc81d11 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -2098,6 +2098,7 @@ static double FxEvaluateSubexpression(FxInfo *fx_info, ExceptionInfo *exception) { #define FxMaxParenthesisDepth 58 +#define FxMaxSubexpressionDepth 200 char *q, @@ -2111,7 +2112,7 @@ static double FxEvaluateSubexpression(FxInfo *fx_info, *p; *beta=0.0; - if (depth > MagickMaxRecursionDepth) + if (depth > FxMaxSubexpressionDepth) { (void) ThrowMagickException(exception,GetMagickModule(),OptionError, "UnableToParseExpression","`%s'",expression);