status=SetImageExtent(image,image->columns,image->rows,exception);
if (status == MagickFalse)
return(DestroyImageList(image));
- quantum=image->depth <= 8 ? 1 : 2;
+ quantum=(ssize_t) (image->depth <= 8 ? 1 : 2);
interlace=image_info->interlace;
horizontal_factor=2;
vertical_factor=2;
image=DestroyImageList(image);
return((Image *) NULL);
}
- if (DiscardBlobBytes(image,image->offset) == MagickFalse)
+ if (DiscardBlobBytes(image,(MagickSizeType) image->offset) == MagickFalse)
ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
image->filename);
}
Allocate memory for a scanline.
*/
if (interlace == NoInterlace)
- scanline=(unsigned char *) AcquireQuantumMemory((size_t) 2UL*
- image->columns+2UL,quantum*sizeof(*scanline));
+ scanline=(unsigned char *) AcquireQuantumMemory((size_t) (2UL*
+ image->columns+2UL),(size_t) quantum*sizeof(*scanline));
else
scanline=(unsigned char *) AcquireQuantumMemory(image->columns,
- quantum*sizeof(*scanline));
+ (size_t) quantum*sizeof(*scanline));
if (scanline == (unsigned char *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
do
break;
status=SetImageExtent(image,image->columns,image->rows,exception);
if (status == MagickFalse)
- return(DestroyImageList(image));
+ break;
if (interlace == PartitionInterlace)
{
AppendImageFormat("Y",image->filename);
break;
}
resize_image=DestroyImage(resize_image);
- SetImageColorspace(image,YCbCrColorspace,exception);
+ if (SetImageColorspace(image,YCbCrColorspace,exception) == MagickFalse)
+ break;
if (interlace == PartitionInterlace)
(void) CopyMagickString(image->filename,image_info->filename,
MagickPathExtent);