Commit 21f8517f authored by Stéphane Albert's avatar Stéphane Albert
Browse files

ENH: Hardened GDALOverviewsBuilder::CountResolutions().

parent 089b617f
......@@ -108,14 +108,17 @@ GDALOverviewsBuilder
unsigned int minSize = static_cast< unsigned int >( pow( factor, n ) );
unsigned int count = 1;
unsigned int size =
std::min(
m_GdalDataset->GetWidth(),
m_GdalDataset->GetHeight()
);
if( size<minSize )
return 0;
unsigned int count = 0;
while( size >= minSize )
{
++ count;
......
Markdown is supported
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