Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/575
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Jul 17, 2017
1 parent 4c87ba3 commit 560e6e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion coders/pcx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,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 560e6e5

Please sign in to comment.