Verified Commit b51bb157 authored by Even Rouault's avatar Even Rouault
Browse files

avoid hang in TIFFRewriteDirectory() if a classic file > 4 GB is attempted to be created

Fixes https://github.com/OSGeo/gdal/issues/5479
parent e1980072
Pipeline #497401686 passed with stages
in 12 minutes and 5 seconds
......@@ -300,6 +300,12 @@ TIFFRewriteDirectory( TIFF *tif )
return (0);
}
}
else if( tif->tif_diroff > 0xFFFFFFFFU )
{
TIFFErrorExt(tif->tif_clientdata, module,
"tif->tif_diroff exceeds 32 bit range allowed for Classic TIFF");
return (0);
}
else
{
uint32_t nextdir;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment