Skip to content
Permalink
Browse files Browse the repository at this point in the history
https://github.com/ImageMagick/ImageMagick/issues/575
  • Loading branch information
Cristy committed Jul 17, 2017
1 parent d3bfbe8 commit 2ba8f33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion coders/pcx.c
Expand Up @@ -1007,7 +1007,10 @@ static MagickBooleanType WritePCXImage(const ImageInfo *image_info,Image *image,
length=(size_t) pcx_info.bytes_per_line;
pixel_info=AcquireVirtualMemory(length,pcx_info.planes*sizeof(*pixels));
if (pixel_info == (MemoryInfo *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
{
pcx_colormap=(unsigned char *) RelinquishMagickMemory(pcx_colormap);
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
}
pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info);
q=pixels;
if ((image->storage_class == DirectClass) || (image->colors > 256))
Expand Down

0 comments on commit 2ba8f33

Please sign in to comment.