diff options
author | skal <pascal.massimino@gmail.com> | 2020-11-12 15:41:14 +0000 |
---|---|---|
committer | skal <pascal.massimino@gmail.com> | 2020-11-12 15:41:14 +0000 |
commit | ce70d17ee6fca89de4361a0f680aaf40b120f32a (patch) | |
tree | 53b5ba8533a4da3c0bbb7d7e56136001087730cf | |
parent | 2e822691d750c01cec5b5cc4ee73567a204ab2a3 (diff) | |
download | libtiff-git-ce70d17ee6fca89de4361a0f680aaf40b120f32a.tar.gz |
Fix potential overflow in gtStripContig()
(w + w) might not fit in int32 if too large.
-rw-r--r-- | libtiff/tif_getimage.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c index 4da785d3..194feb36 100644 --- a/libtiff/tif_getimage.c +++ b/libtiff/tif_getimage.c @@ -936,6 +936,10 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) flip = setorientation(img); if (flip & FLIP_VERTICALLY) { + if ( w > 0x7FFFFFFFu ) { + TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Width overflow"); + return (0); + } y = h - 1; toskew = -(int32)(w + w); } else { |