Skip to content
Permalink
Browse files Browse the repository at this point in the history
https://github.com/ImageMagick/ImageMagick/issues/99
  • Loading branch information
Cristy committed Jan 24, 2016
1 parent 87b213f commit 7be16a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coders/viff.c
Expand Up @@ -502,8 +502,8 @@ static Image *ReadVIFFImage(const ImageInfo *image_info,
max_packets=((image->columns+7UL) >> 3UL)*image->rows;
else
max_packets=(size_t) (number_pixels*viff_info.number_data_bands);
pixels=(unsigned char *) AcquireQuantumMemory(max_packets,
bytes_per_pixel*sizeof(*pixels));
pixels=(unsigned char *) AcquireQuantumMemory(MagickMax(number_pixels,
max_packets),bytes_per_pixel*sizeof(*pixels));
if (pixels == (unsigned char *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
count=ReadBlob(image,bytes_per_pixel*max_packets,pixels);
Expand Down

0 comments on commit 7be16a2

Please sign in to comment.