mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-23 16:42:35 +00:00
Quiet warnings: unsigned ints can't be negative
git-svn-id: http://svn.osgeo.org/postgis/trunk@13822 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
dda44b2964
commit
e2f4403eb5
|
@ -1702,8 +1702,7 @@ SHPReadObject( SHPHandle psSHP, int hEntity )
|
|||
if( bBigEndian ) SwapWord( 4, &nPoints );
|
||||
if( bBigEndian ) SwapWord( 4, &nParts );
|
||||
|
||||
if (nPoints < 0 || nParts < 0 ||
|
||||
nPoints > 50 * 1000 * 1000 || nParts > 10 * 1000 * 1000)
|
||||
if (nPoints > 50 * 1000 * 1000 || nParts > 10 * 1000 * 1000)
|
||||
{
|
||||
snprintf(szErrorMsg, sizeof(szErrorMsg),
|
||||
"Corrupted .shp file : shape %d, nPoints=%d, nParts=%d.",
|
||||
|
@ -1901,7 +1900,7 @@ SHPReadObject( SHPHandle psSHP, int hEntity )
|
|||
|
||||
if( bBigEndian ) SwapWord( 4, &nPoints );
|
||||
|
||||
if (nPoints < 0 || nPoints > 50 * 1000 * 1000)
|
||||
if (nPoints > 50 * 1000 * 1000)
|
||||
{
|
||||
snprintf(szErrorMsg, sizeof(szErrorMsg),
|
||||
"Corrupted .shp file : shape %d : nPoints = %d",
|
||||
|
|
Loading…
Reference in a new issue