Fix potential overflow in gtStripContig()
(w + w) might not fit in int32 if too large.
This commit is contained in:
parent
2e822691d7
commit
ce70d17ee6
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user