pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- quantum_info=DestroyQuantumInfo(quantum_info);
- ThrowReaderException(CorruptImageError,"UnableToReadImageData");
- }
+ break;
(void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
GrayQuantum,pixels,exception);
pixels=(const unsigned char *) ReadBlobStream(image,(size_t) (-(ssize_t)
}
SetQuantumImageType(image,GrayQuantum);
quantum_info=DestroyQuantumInfo(quantum_info);
+ if (y < (ssize_t) image->rows)
+ ThrowReaderException(CorruptImageError,"UnableToReadImageData");
if (EOFBlob(image) != MagickFalse)
ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
image->filename);