Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/1453
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Jan 20, 2019
1 parent 9cf2f73 commit f14f66d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion coders/bmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2314,7 +2314,10 @@ static MagickBooleanType WriteBMPImage(const ImageInfo *image_info,Image *image,
bmp_colormap=(unsigned char *) AcquireQuantumMemory((size_t) (1UL <<
bmp_info.bits_per_pixel),4*sizeof(*bmp_colormap));
if (bmp_colormap == (unsigned char *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
{
pixel_info=RelinquishVirtualMemory(pixel_info);
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
}
q=bmp_colormap;
for (i=0; i < (ssize_t) MagickMin((ssize_t) image->colors,(ssize_t) bmp_info.number_colors); i++)
{
Expand Down

0 comments on commit f14f66d

Please sign in to comment.