From: Cristy Date: Fri, 20 Sep 2019 23:49:46 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/1701 X-Git-Tag: 7.0.8-66~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7113d7ddd1d77576b2692b389ca796f6e70d0c6c;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/1701 --- diff --git a/ChangeLog b/ChangeLog index 1cff2ad52..4f7a357df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2019-09-20 7.0.8-66 Cristy + * Release ImageMagick version 7.0.8-66, GIT revision 16... + +2019-09-09 7.0.8-65 Cristy + * Compound statements are not permitted with FX while() (reference + https://github.com/ImageMagick/ImageMagick/issues/1701). + 2019-09-15 7.0.8-65 Cristy * Release ImageMagick version 7.0.8-65, GIT revision 16130:254db34:20190915. diff --git a/MagickCore/fx.c b/MagickCore/fx.c index 3d74b07d3..880dc5a8d 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -2949,12 +2949,18 @@ static double FxEvaluateSubexpression(FxInfo *fx_info, { if (IsFxFunction(expression,"while",5) != MagickFalse) { - do - { - alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+5, - depth+1,beta,exception); - } while (fabs(alpha) >= MagickEpsilon); - FxReturn(*beta); + if (strchr(expression,';') != (char *) NULL) + (void) ThrowMagickException(exception,GetMagickModule(),OptionError, + "UnableToParseExpression","`%s'",expression); + else + { + do + { + alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+5, + depth+1,beta,exception); + } while (fabs(alpha) >= MagickEpsilon); + FxReturn(*beta); + } } if (LocaleCompare(expression,"w") == 0) FxReturn(FxGetSymbol(fx_info,channel,x,y,expression,depth+1,exception));