We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 74d76d5 commit bdb5727Copy full SHA for bdb5727
src/server/services/wms/qgswmsrenderer.cpp
@@ -1854,14 +1854,13 @@ namespace QgsWms
1854
1855
const int bytes_per_line = ( ( width * depth + 31 ) >> 5 ) << 2; // bytes per scanline (must be multiple of 4)
1856
1857
- if ( INT_MAX / depth < width
+ if ( std::numeric_limits<int>::max() / depth < ( uint )width
1858
|| bytes_per_line <= 0
1859
|| height <= 0
1860
- || INT_MAX / uint( bytes_per_line ) < height
1861
- || INT_MAX / sizeof( uchar * ) < uint( height ) )
+ || std::numeric_limits<int>::max() / uint( bytes_per_line ) < ( uint )height
+ || std::numeric_limits<int>::max() / sizeof( uchar * ) < uint( height ) )
1862
return false;
1863
1864
-
1865
return true;
1866
}
1867
0 commit comments