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

index 3710e507ecf2927a5dac3ad53f279a9401de828c..8552ac28b9bc6ccf8c64dc1c23b5e591ca48e4f5 100644 (file)
@@ -210,6 +210,8 @@ 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))
+      break;
     value+=c-(int) '0';
     c=ReadBlobByte(image);
     if (c == EOF)