]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7397
authorCristy <urban-warrior@imagemagick.org>
Thu, 5 Apr 2018 12:54:32 +0000 (08:54 -0400)
committerCristy <urban-warrior@imagemagick.org>
Thu, 5 Apr 2018 12:54:32 +0000 (08:54 -0400)
MagickCore/fx.c

index 1fbc68ac09c73564590b65efdfa37972f640dcdf..1b007cdccd4ed5d8b3511443716f9cffcb3eecc2 100644 (file)
@@ -2755,7 +2755,7 @@ static double FxEvaluateSubexpression(FxInfo *fx_info,
         {
           alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+3,
             depth+1,beta,exception);
-          gamma=alpha-floor((alpha/(*beta)))*(*beta);
+          gamma=alpha-floor((alpha*PerceptibleReciprocal(*beta)))*(*beta);
           FxReturn(gamma);
         }
       if (LocaleCompare(expression,"m") == 0)