]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/1701
authorCristy <urban-warrior@imagemagick.org>
Fri, 20 Sep 2019 23:49:46 +0000 (19:49 -0400)
committerCristy <urban-warrior@imagemagick.org>
Fri, 20 Sep 2019 23:49:46 +0000 (19:49 -0400)
ChangeLog
MagickCore/fx.c

index 1cff2ad528dea40dce3d39e60b09eb2f67a90245..4f7a357df596ab1b4616e51de71eaf5ed4832fcb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-09-20  7.0.8-66 Cristy  <quetzlzacatenango@image...>
+  * Release ImageMagick version 7.0.8-66, GIT revision 16...
+
+2019-09-09  7.0.8-65 Cristy  <quetzlzacatenango@image...>
+  * Compound statements are not permitted with FX while() (reference
+    https://github.com/ImageMagick/ImageMagick/issues/1701).
+
 2019-09-15  7.0.8-65 Cristy  <quetzlzacatenango@image...>
   * Release ImageMagick version 7.0.8-65, GIT revision 16130:254db34:20190915.
 
index 3d74b07d33adcae42a14c8d12692575c7fa1648d..880dc5a8d656b0e89b59a7e6864e62ffc826096b 100644 (file)
@@ -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));