]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5557
authorCristy <urban-warrior@imagemagick.org>
Tue, 6 Feb 2018 01:16:58 +0000 (20:16 -0500)
committerCristy <urban-warrior@imagemagick.org>
Tue, 6 Feb 2018 01:16:58 +0000 (20:16 -0500)
coders/fits.c

index ad6ae88ca1645b0a156594dff7fe249e2eb9338f..9fc3998d70803c74b1875607fc5b6a652d9139ec 100644 (file)
@@ -452,7 +452,8 @@ static Image *ReadFITSImage(const ImageInfo *image_info,
     /*
       Convert FITS pixels to pixel packets.
     */
-    scale=QuantumRange/(fits_info.max_data-fits_info.min_data);
+    scale=QuantumRange*PerceptibleReciprocal(fits_info.max_data-
+      fits_info.min_data);
     for (y=(ssize_t) image->rows-1; y >= 0; y--)
     {
       q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);