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 bee5e46 commit ca0c886
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coders/viff.c
Expand Up @@ -506,8 +506,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");
(void) ReadBlob(image,bytes_per_pixel*max_packets,pixels);
Expand Down

0 comments on commit ca0c886

Please sign in to comment.