From d550b52dca57124229d0adfc9daa70adb5ea8dcb Mon Sep 17 00:00:00 2001 From: cristy Date: Thu, 29 Nov 2012 12:33:11 +0000 Subject: [PATCH] --- coders/pcx.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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; -- 2.50.1