Skip to content
Permalink
Browse files Browse the repository at this point in the history
https://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/1537213
  • Loading branch information
Cristy committed Jan 23, 2016
1 parent b8aa2bd commit 14e606d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions coders/hdr.c
Expand Up @@ -723,7 +723,8 @@ static MagickBooleanType WriteHDRImage(const ImageInfo *image_info,Image *image,
}
if (image->gamma != 0.0)
{
count=FormatLocaleString(header,MagickPathExtent,"GAMMA=%g\n",image->gamma);
count=FormatLocaleString(header,MagickPathExtent,"GAMMA=%g\n",
image->gamma);
(void) WriteBlob(image,(size_t) count,(unsigned char *) header);
}
count=FormatLocaleString(header,MagickPathExtent,
Expand All @@ -741,10 +742,11 @@ static MagickBooleanType WriteHDRImage(const ImageInfo *image_info,Image *image,
/*
Write HDR pixels.
*/
pixels=(unsigned char *) AcquireQuantumMemory(image->columns,4*
pixels=(unsigned char *) AcquireQuantumMemory(image->columns+128,4*
sizeof(*pixels));
if (pixels == (unsigned char *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
(void) ResetMagickMemory(pixels,0,4*(image->columns+128)*sizeof(*pixels));
for (y=0; y < (ssize_t) image->rows; y++)
{
p=GetVirtualPixels(image,0,y,image->columns,1,exception);
Expand Down

0 comments on commit 14e606d

Please sign in to comment.