]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5826
authorCristy <urban-warrior@imagemagick.org>
Tue, 30 Jan 2018 18:01:40 +0000 (13:01 -0500)
committerCristy <urban-warrior@imagemagick.org>
Tue, 30 Jan 2018 18:01:40 +0000 (13:01 -0500)
MagickCore/draw.c

index ad2c28104a710b83bd7fe5e918687dcce76ea734..1a251683bcddaa2ee873aab4974feb40eaf2f27e 100644 (file)
@@ -3469,7 +3469,7 @@ MagickExport MagickBooleanType DrawGradientImage(Image *image,
     composite=zero;
     offset=GetStopColorOffset(gradient,0,y);
     if (gradient->type != RadialGradient)
-      offset/=length;
+      offset*=PerceptibleReciprocal(length);
     for (x=bounding_box.x; x < (ssize_t) bounding_box.width; x++)
     {
       GetPixelInfoPixel(image,q,&pixel);