]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/1753
authorCristy <urban-warrior@imagemagick.org>
Mon, 14 Oct 2019 23:43:23 +0000 (19:43 -0400)
committerCristy <urban-warrior@imagemagick.org>
Mon, 14 Oct 2019 23:43:23 +0000 (19:43 -0400)
coders/pdf.c

index 3a8de0411fbda9f6a9e4d091eebb66196226ed55..3a4a953bfae144f893138632ae7a333aea8fb89a 100644 (file)
@@ -1989,7 +1989,7 @@ RestoreMSCWarning
                   break;
                 for (x=0; x < (ssize_t) image->columns; x++)
                 {
-                  *q++=(unsigned char) GetPixelIndex(image,p);
+                  *q++=(unsigned char) ((ssize_t) GetPixelIndex(image,p));
                   p+=GetPixelChannels(image);
                 }
                 if (image->previous == (Image *) NULL)
@@ -2031,7 +2031,8 @@ RestoreMSCWarning
                   break;
                 for (x=0; x < (ssize_t) image->columns; x++)
                 {
-                  Ascii85Encode(image,(unsigned char) GetPixelIndex(image,p));
+                  Ascii85Encode(image,(unsigned char) ((ssize_t)
+                    GetPixelIndex(image,p)));
                   p+=GetPixelChannels(image);
                 }
                 if (image->previous == (Image *) NULL)
@@ -2506,7 +2507,7 @@ RestoreMSCWarning
                   break;
                 for (x=0; x < (ssize_t) tile_image->columns; x++)
                 {
-                  *q++=(unsigned char) GetPixelIndex(tile_image,p);
+                  *q++=(unsigned char) ((ssize_t) GetPixelIndex(tile_image,p));
                   p+=GetPixelChannels(tile_image);
                 }
               }