From: cristy Date: Mon, 15 Dec 2014 01:31:53 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~1646 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dee3469d9813560e00d60258d0c5eba14f083663;p=imagemagick --- diff --git a/coders/pnm.c b/coders/pnm.c index 3710e507e..8552ac28b 100644 --- a/coders/pnm.c +++ b/coders/pnm.c @@ -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)