]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Fri, 1 Sep 2017 13:33:59 +0000 (09:33 -0400)
committerCristy <urban-warrior@imagemagick.org>
Fri, 1 Sep 2017 13:33:59 +0000 (09:33 -0400)
coders/pnm.c
coders/txt.c

index 8f417cb18557a07ea9fa0bb93a8dab02273a0fde..2c23d746ca8d3bccc025df2812816713aa9cab0b 100644 (file)
@@ -415,7 +415,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
       }
     if ((image->columns == 0) || (image->rows == 0))
       ThrowReaderException(CorruptImageError,"NegativeOrZeroImageSize");
-    if ((max_value == 0) || (max_value > 4294967295))
+    if ((max_value == 0) || (max_value > 4294967295UL))
       ThrowReaderException(CorruptImageError,"ImproperImageHeader");
     for (depth=1; GetQuantumRange(depth) < max_value; depth++) ;
     image->depth=depth;
index 93a5e76db8ac129806d2b6d29174b046c7f0d8d7..abe5ea08ea374e8e6c0c5321e6c0a532613bb4b0 100644 (file)
@@ -446,7 +446,7 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
       ThrowReaderException(CorruptImageError,"ImproperImageHeader");
     image->columns=width;
     image->rows=height;
-    if ((max_value == 0) || (max_value > 4294967295))
+    if ((max_value == 0) || (max_value > 4294967295UL))
       ThrowReaderException(CorruptImageError,"ImproperImageHeader");
     for (depth=1; (GetQuantumRange(depth)+1) < max_value; depth++) ;
     image->depth=depth;