diff --git a/coders/ps3.c b/coders/ps3.c index 38099a7a1b..74b75512da 100644 --- a/coders/ps3.c +++ b/coders/ps3.c @@ -330,25 +330,21 @@ static MagickBooleanType SerializeImage(const ImageInfo *image_info, extent; ssize_t - x; + x, + y; unsigned char *q; - ssize_t - y; - assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (IsEventLogging() != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); status=MagickTrue; channels=(image->colorspace == CMYKColorspace ? 4 : 3); - if (HeapOverflowSanityCheckGetSize(channels,(size_t) image->columns, - &extent) != MagickFalse) + if (HeapOverflowSanityCheckGetSize(channels,(size_t) image->columns,&extent) != MagickFalse) ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); - if (HeapOverflowSanityCheckGetSize(extent,image->rows,length) != - MagickFalse) + if (HeapOverflowSanityCheckGetSize(extent,image->rows,length) != MagickFalse) ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); *pixel_info=AcquireVirtualMemory(*length,sizeof(*q)); if (*pixel_info == (MemoryInfo *) NULL)