From: cristy Date: Thu, 29 Nov 2012 12:33:11 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~4666 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d550b52dca57124229d0adfc9daa70adb5ea8dcb;p=imagemagick --- diff --git a/coders/pcx.c b/coders/pcx.c index 0b1e6496a..8df8cc8bc 100644 --- a/coders/pcx.c +++ b/coders/pcx.c @@ -125,7 +125,6 @@ static MagickBooleanType % % o length: Specifies the length of the magick string. % -% */ static MagickBooleanType IsDCX(const unsigned char *magick,const size_t length) { @@ -160,7 +159,6 @@ static MagickBooleanType IsDCX(const unsigned char *magick,const size_t length) % % o length: Specifies the length of the magick string. % -% */ static MagickBooleanType IsPCX(const unsigned char *magick,const size_t length) { @@ -402,7 +400,7 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception) { packet=(unsigned char) ReadBlobByte(image); if (EOFBlob(image) != MagickFalse) - break; + ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile"); *p++=packet; pcx_packets--; } @@ -411,7 +409,7 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception) { packet=(unsigned char) ReadBlobByte(image); if (EOFBlob(image) != MagickFalse) - break; + ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile"); if ((packet & 0xc0) != 0xc0) { *p++=packet; @@ -421,7 +419,7 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception) count=(ssize_t) (packet & 0x3f); packet=(unsigned char) ReadBlobByte(image); if (EOFBlob(image) != MagickFalse) - break; + ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile"); for ( ; count != 0; count--) { *p++=packet;