]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 15 Dec 2014 11:04:12 +0000 (11:04 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 15 Dec 2014 11:04:12 +0000 (11:04 +0000)
coders/pnm.c

index 2df68020a665e8e0d558dda6f6cfa958ef086df2..e6290aaf006e3b2fa81a037de2f1e5a12f6a3346 100644 (file)
@@ -210,7 +210,7 @@ static unsigned int PNMInteger(Image *image,const unsigned int base,
     if (value > (unsigned int) (INT_MAX/10))
       break;
     value*=10;
-    if (value > (INT_MAX-c))
+    if (value > (INT_MAX-(c-(int) '0')))
       break;
     value+=c-(int) '0';
     c=ReadBlobByte(image);