Skip to content

Commit

Permalink
heap-based buffer overflow in TIFF coder (alert from Hunter Mitchell)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Jul 26, 2021
1 parent e1fbcdf commit 35b88c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coders/tiff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1894,9 +1894,9 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
ThrowTIFFException(ResourceLimitError,"MemoryAllocationFailed");
extent=TIFFTileSize(tiff);
#if defined(TIFF_VERSION_BIG)
extent+=columns*sizeof(uint64);
extent=MagickMax(rows*columns*sizeof(uint64),extent);
#else
extent+=columns*sizeof(uint32);
extent=MagickMax(rows*columns*sizeof(uint32),extent);
#endif
tile_pixels=(unsigned char *) AcquireQuantumMemory(extent,
sizeof(*tile_pixels));
Expand Down

0 comments on commit 35b88c9

Please sign in to comment.