From 4fc6fc13832a0ab0037040cc951ace96b240eb22 Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 22 Mar 2018 20:33:58 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7071 --- MagickCore/fx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.40.0