if (EOFBlob(image) != MagickFalse)
ThrowBinaryException(CorruptImageError,"InsufficientImageDataInFile",
image->filename);
+ if ((outLayer->width < 1) || (outLayer->width > image->columns) ||
+ (outLayer->height < 1) || (outLayer->height > image->rows))
+ ThrowBinaryException(CorruptImageError,"ImproperImageHeader",
+ image->filename);
/* read the layer properties! */
foundPropEnd = 0;
while ( (foundPropEnd == MagickFalse) && (EOFBlob(image) == MagickFalse) ) {
exception);
if (outLayer->image == (Image *) NULL)
return(MagickFalse);
+ outLayer->width=outLayer->image->columns;
status=SetImageExtent(outLayer->image,outLayer->image->columns,
outLayer->image->rows,exception);
if (status == MagickFalse)