EstimateStripByteCounts(): avoid unsigned integer overflow
This commit is contained in:
parent
761d50e34d
commit
c8f268ef1b
@ -4549,6 +4549,8 @@ EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount)
|
||||
dp->tdir_type);
|
||||
return -1;
|
||||
}
|
||||
if( dp->tdir_count > TIFF_UINT64_MAX / typewidth )
|
||||
return -1;
|
||||
datasize=(uint64)typewidth*dp->tdir_count;
|
||||
if (!(tif->tif_flags&TIFF_BIGTIFF))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user