1991 {
1992
1993 int nSHPContentLength;
1994 memcpy( &nSHPContentLength, psSHP->pabyRec + 4, 4 );
1996 if( nSHPContentLength < 0 ||
1997 nSHPContentLength > INT_MAX / 2 - 4 ||
1999 {
2001 snprintf(
str,
sizeof(
str),
2002 "Sanity check failed when trying to recover from inconsistent .shx/.shp with shape %d",
2003 hEntity );
2004 str[
sizeof(
str)-1] =
'\0';
2005
2006 psSHP->sHooks.Error(
str );
2008 }
2009 }
static void SwapWord(int length, void *wordP)