From: Cristy Date: Fri, 1 Sep 2017 13:33:59 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.7-0~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b9ba5bbd396fb5201ad270164bedd426a29fb6a0;p=imagemagick ... --- diff --git a/coders/pnm.c b/coders/pnm.c index 8f417cb18..2c23d746c 100644 --- a/coders/pnm.c +++ b/coders/pnm.c @@ -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; diff --git a/coders/txt.c b/coders/txt.c index 93a5e76db..abe5ea08e 100644 --- a/coders/txt.c +++ b/coders/txt.c @@ -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;