Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/1020
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Mar 17, 2018
1 parent f55d3a6 commit 23f6bee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions coders/tiff.c
Expand Up @@ -1760,8 +1760,9 @@ RestoreMSCWarning
if (((MagickSizeType) TIFFScanlineSize(tiff)) > GetBlobSize(image))
ThrowTIFFException(CorruptImageError,"InsufficientImageDataInFile");
tiff_pixels=(unsigned char *) AcquireMagickMemory(MagickMax(
TIFFScanlineSize(tiff),(ssize_t) (image->columns*samples_per_pixel*
pow(2.0,ceil(log(bits_per_sample)/log(2.0)))*sizeof(uint32))));
TIFFScanlineSize(tiff),(ssize_t) MagickMax(image->columns*
samples_per_pixel*pow(2.0,ceil(log(bits_per_sample)/log(2.0))),
rows_per_strip)*sizeof(uint32)));
if (tiff_pixels == (unsigned char *) NULL)
ThrowTIFFException(ResourceLimitError,"MemoryAllocationFailed");
switch (method)
Expand Down

0 comments on commit 23f6bee

Please sign in to comment.