Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/shapelib-1.5.0/shptreedump.c
Examining data/shapelib-1.5.0/shpopen.c
Examining data/shapelib-1.5.0/shpcreate.c
Examining data/shapelib-1.5.0/dbfopen.c
Examining data/shapelib-1.5.0/safileio.c
Examining data/shapelib-1.5.0/shptest.c
Examining data/shapelib-1.5.0/dbfcreate.c
Examining data/shapelib-1.5.0/shpadd.c
Examining data/shapelib-1.5.0/dbfadd.c
Examining data/shapelib-1.5.0/shpdump.c
Examining data/shapelib-1.5.0/shprewind.c
Examining data/shapelib-1.5.0/dbfdump.c
Examining data/shapelib-1.5.0/sbnsearch.c
Examining data/shapelib-1.5.0/shptree.c
Examining data/shapelib-1.5.0/shputils.c
Examining data/shapelib-1.5.0/contrib/dbfinfo.c
Examining data/shapelib-1.5.0/contrib/shpdata.c
Examining data/shapelib-1.5.0/contrib/dbfcat.c
Examining data/shapelib-1.5.0/contrib/shpgeo.c
Examining data/shapelib-1.5.0/contrib/shpgeo.h
Examining data/shapelib-1.5.0/contrib/shpsort.c
Examining data/shapelib-1.5.0/contrib/shpdxf.c
Examining data/shapelib-1.5.0/contrib/shpcat.c
Examining data/shapelib-1.5.0/contrib/Shape_PointInPoly.cpp
Examining data/shapelib-1.5.0/contrib/shpinfo.c
Examining data/shapelib-1.5.0/contrib/shpfix.c
Examining data/shapelib-1.5.0/contrib/shpcentrd.c
Examining data/shapelib-1.5.0/contrib/shpwkb.c
Examining data/shapelib-1.5.0/shapefil.h

FINAL RESULTS:

data/shapelib-1.5.0/contrib/dbfcat.c:60:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy (tfile, argv[1 + shift]);
data/shapelib-1.5.0/contrib/dbfcat.c:69:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy (tfile, argv[2 + shift]);
data/shapelib-1.5.0/contrib/shpdxf.c:59:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf( df, FLOAT_PREC, x2 );
data/shapelib-1.5.0/contrib/shpdxf.c:61:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf( df, FLOAT_PREC, y2 );
data/shapelib-1.5.0/contrib/shpdxf.c:65:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf( df, FLOAT_PREC, x1 );
data/shapelib-1.5.0/contrib/shpdxf.c:67:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf( df, FLOAT_PREC, y1 );
data/shapelib-1.5.0/contrib/shpdxf.c:176:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf( df, FLOAT_PREC, x );
data/shapelib-1.5.0/contrib/shpdxf.c:178:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf( df, FLOAT_PREC, y );
data/shapelib-1.5.0/contrib/shpdxf.c:181:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf( df, FLOAT_PREC, z );
data/shapelib-1.5.0/contrib/shpdxf.c:222:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy (shpFileName,argv[1]);
data/shapelib-1.5.0/contrib/shpdxf.c:247:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy (idfldName, argv[2]);
data/shapelib-1.5.0/contrib/shpdxf.c:279:31:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
              case FTString:  sprintf (id, "lvl_%s",DBFReadStringAttribute ( dbf, recNum, idfld ));
data/shapelib-1.5.0/contrib/shpgeo.c:154:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy( pszBasename, fil );
data/shapelib-1.5.0/contrib/shpgeo.c:168:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf( pszFullname, "%s.%s", pszBasename, ext );
data/shapelib-1.5.0/contrib/shpsort.c:323:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(&in[(name_len - old_len)], new_ext);
data/shapelib-1.5.0/contrib/shpsort.c:332:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(&out[(name_len - old_len)], new_ext);
data/shapelib-1.5.0/dbfdump.c:193:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf( szFormat, szTitle );
data/shapelib-1.5.0/dbfdump.c:229:21:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                    printf( szFormat, "(NULL)" );
data/shapelib-1.5.0/dbfdump.c:237:25:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                        printf( szFormat, 
data/shapelib-1.5.0/dbfdump.c:243:25:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                        printf( szFormat, 
data/shapelib-1.5.0/dbfdump.c:249:25:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                        printf( szFormat, 
data/shapelib-1.5.0/dbfdump.c:265:17:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                printf( szFormat, 
data/shapelib-1.5.0/dbfdump.c:276:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		printf( szFormat, "" );
data/shapelib-1.5.0/dbfopen.c:220:14:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#     define snprintf _snprintf
data/shapelib-1.5.0/dbfopen.c:220:23:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#     define snprintf _snprintf
data/shapelib-1.5.0/dbfopen.c:223:11:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  ifndef snprintf
data/shapelib-1.5.0/dbfopen.c:224:14:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#     define snprintf _snprintf
data/shapelib-1.5.0/dbfopen.c:224:23:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#     define snprintf _snprintf
data/shapelib-1.5.0/dbfopen.c:228:20:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
#define CPLsprintf sprintf
data/shapelib-1.5.0/dbfopen.c:229:21:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define CPLsnprintf snprintf
data/shapelib-1.5.0/dbfopen.c:651:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy( psDBF->pszCodePage, REINTERPRET_CAST(char *, pabyBuf) );
data/shapelib-1.5.0/dbfopen.c:907:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy( psDBF->pszCodePage, pszCodePage );
data/shapelib-1.5.0/sbnsearch.c:53:14:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#     define snprintf _snprintf
data/shapelib-1.5.0/sbnsearch.c:53:23:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#     define snprintf _snprintf
data/shapelib-1.5.0/sbnsearch.c:56:11:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  ifndef snprintf
data/shapelib-1.5.0/sbnsearch.c:57:14:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#     define snprintf _snprintf
data/shapelib-1.5.0/sbnsearch.c:57:23:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#     define snprintf _snprintf
data/shapelib-1.5.0/shapefil.h:290:61:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    SAFile     (*FOpen) ( const char *filename, const char *access);
data/shapelib-1.5.0/shpopen.c:341:14:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#     define snprintf _snprintf
data/shapelib-1.5.0/shpopen.c:341:23:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#     define snprintf _snprintf
data/shapelib-1.5.0/shpopen.c:344:11:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  ifndef snprintf
data/shapelib-1.5.0/shpopen.c:345:14:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#     define snprintf _snprintf
data/shapelib-1.5.0/shpopen.c:345:23:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#     define snprintf _snprintf
data/shapelib-1.5.0/shptreedump.c:281:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf( pszFormat, padfCoord[0] );
data/shapelib-1.5.0/shptreedump.c:283:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf( pszFormat, padfCoord[1] );
data/shapelib-1.5.0/shptreedump.c:288:9:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        printf( pszFormat, padfCoord[2] );
data/shapelib-1.5.0/shptreedump.c:293:9:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        printf( pszFormat, padfCoord[3] );
data/shapelib-1.5.0/shptreedump.c:350:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy( szNextPrefix, pszPrefix );
data/shapelib-1.5.0/shputils.c:188:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(infile, argv[1]);
data/shapelib-1.5.0/shputils.c:190:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(outfile,argv[2]);
data/shapelib-1.5.0/shputils.c:210:10:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    	    strcpy(selectitem,argv[i]);
data/shapelib-1.5.0/shputils.c:214:10:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    	    strcpy(temp,argv[i]);
data/shapelib-1.5.0/shputils.c:236:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(clipfile,argv[i]);
data/shapelib-1.5.0/shputils.c:566:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(pt,ext);
data/shapelib-1.5.0/shputils.c:727:37:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            if (dlow < dhigh)       printf(stmp,dlow,dhigh,mean);
data/shapelib-1.5.0/shputils.c:730:17:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                printf(stmp,dlow);
data/shapelib-1.5.0/contrib/Shape_PointInPoly.cpp:223:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    quality = atoi(argv[2]);
data/shapelib-1.5.0/contrib/dbfcat.c:33:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	szFormat[32], szField[1024];
data/shapelib-1.5.0/contrib/dbfcat.c:34:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	cTitle[32], nTitle[32];
data/shapelib-1.5.0/contrib/dbfcat.c:40:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	tfile[160];
data/shapelib-1.5.0/contrib/dbfcat.c:46:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	fld_m[256];
data/shapelib-1.5.0/contrib/dbfcat.c:48:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	type_names[4][15] = {"integer", "string", "double", "double"};
data/shapelib-1.5.0/contrib/dbfcat.c:61:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
    strcat (tfile, ".dbf"); 
data/shapelib-1.5.0/contrib/dbfcat.c:70:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
    strcat (tfile, ".dbf"); 
data/shapelib-1.5.0/contrib/dbfcat.c:92:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		szTitle[18];
data/shapelib-1.5.0/contrib/dbfcat.c:93:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		cname[18];
data/shapelib-1.5.0/contrib/dbfinfo.c:36:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	szFormat[32], szField[1024];
data/shapelib-1.5.0/contrib/dbfinfo.c:37:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	ftype[32], cTitle[32], nTitle[32];
data/shapelib-1.5.0/contrib/dbfinfo.c:80:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		szTitle[12];
data/shapelib-1.5.0/contrib/dbfinfo.c:85:10:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	        strcpy (ftype, "string");;
data/shapelib-1.5.0/contrib/dbfinfo.c:89:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	    	strcpy (ftype, "integer");
data/shapelib-1.5.0/contrib/dbfinfo.c:93:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	    	strcpy (ftype, "float");
data/shapelib-1.5.0/contrib/dbfinfo.c:97:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	    	strcpy (ftype, "invalid/unsupported");
data/shapelib-1.5.0/contrib/dbfinfo.c:101:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	      	strcpy (ftype, "unknown");
data/shapelib-1.5.0/contrib/shpcentrd.c:64:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	kv[257] = "";
data/shapelib-1.5.0/contrib/shpcentrd.c:65:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	idfldName[120] = "";
data/shapelib-1.5.0/contrib/shpcentrd.c:66:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	fldName[120] = "";
data/shapelib-1.5.0/contrib/shpcentrd.c:67:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	shpFileName[120] = "";
data/shapelib-1.5.0/contrib/shpcentrd.c:68:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	dbfFileName[120] = "";
data/shapelib-1.5.0/contrib/shpcentrd.c:127:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy ( DBFRow, DBFReadTuple ( old_DBF, i ),
data/shapelib-1.5.0/contrib/shpcentrd.c:146:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy ( DBFRow, DBFReadTuple ( old_DBF, i ),
data/shapelib-1.5.0/contrib/shpdata.c:55:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	kv[257] = "";
data/shapelib-1.5.0/contrib/shpdata.c:56:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	idfldName[120] = "";
data/shapelib-1.5.0/contrib/shpdata.c:57:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	fldName[120] = "";
data/shapelib-1.5.0/contrib/shpdata.c:58:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	shpFileName[120] = "";
data/shapelib-1.5.0/contrib/shpdata.c:59:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	dbfFileName[120] = "";
data/shapelib-1.5.0/contrib/shpdxf.c:201:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char shpFileName[80] = "", dbfFileName[80] = "";
data/shapelib-1.5.0/contrib/shpdxf.c:202:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char dxfFileName[80] = "";
data/shapelib-1.5.0/contrib/shpdxf.c:203:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char idfldName[15];
data/shapelib-1.5.0/contrib/shpdxf.c:204:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char zfldName[6] = "ELEV";
data/shapelib-1.5.0/contrib/shpdxf.c:205:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char fldName[15];
data/shapelib-1.5.0/contrib/shpdxf.c:206:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char id[255];
data/shapelib-1.5.0/contrib/shpdxf.c:224:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
    strcat (dbfFileName,"dbf"); 
data/shapelib-1.5.0/contrib/shpdxf.c:227:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
    strcat( dxfFileName, "dxf");
data/shapelib-1.5.0/contrib/shpdxf.c:231:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    dxf = fopen( dxfFileName, "w");
data/shapelib-1.5.0/contrib/shpdxf.c:243:32:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    if ( argc > 3 )  MaxElem = atoi(argv[3]);
data/shapelib-1.5.0/contrib/shpdxf.c:281:27:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
              default:    sprintf(id, "%-20.0lf", DBFReadDoubleAttribute (dbf, recNum, idfld));
data/shapelib-1.5.0/contrib/shpdxf.c:284:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf (id,"lvl_%-20d",(recNum +1 )); 
data/shapelib-1.5.0/contrib/shpfix.c:59:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
   fix_rec = atoi (argv[3]);
data/shapelib-1.5.0/contrib/shpgeo.c:145:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char	pszBasename[120];
data/shapelib-1.5.0/contrib/shpgeo.c:146:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char	pszFullname[120];
data/shapelib-1.5.0/contrib/shpgeo.c:249:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
     memcpy (stream_obj, &GeoType, sizeof (GeoType) );
data/shapelib-1.5.0/contrib/shpgeo.c:255:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (stream_obj, &(psCShape->nSHPType),  sizeof (psCShape->nSHPType) );
data/shapelib-1.5.0/contrib/shpgeo.c:256:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (stream_obj, &(psCShape->nShapeId),  sizeof (psCShape->nShapeId) );
data/shapelib-1.5.0/contrib/shpgeo.c:257:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (stream_obj, &(psCShape->nVertices), sizeof (psCShape->nVertices) );
data/shapelib-1.5.0/contrib/shpgeo.c:258:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (stream_obj, &(psCShape->nParts), 	 sizeof (psCShape->nParts) );
data/shapelib-1.5.0/contrib/shpgeo.c:259:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (stream_obj, &(psCShape->dfXMin), 	 sizeof (psCShape->dfXMin) );
data/shapelib-1.5.0/contrib/shpgeo.c:260:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (stream_obj, &(psCShape->dfYMin), 	 sizeof (psCShape->dfYMin) );
data/shapelib-1.5.0/contrib/shpgeo.c:261:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (stream_obj, &(psCShape->dfXMax), 	 sizeof (psCShape->dfXMax) );
data/shapelib-1.5.0/contrib/shpgeo.c:262:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (stream_obj, &(psCShape->dfYMax), 	 sizeof (psCShape->dfYMax) );
data/shapelib-1.5.0/contrib/shpgeo.c:264:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (stream_obj, &(psCShape->dfZMin), 	 sizeof (psCShape->dfZMin) );
data/shapelib-1.5.0/contrib/shpgeo.c:265:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (stream_obj, &(psCShape->dfZMax), 	 sizeof (psCShape->dfZMax) );
data/shapelib-1.5.0/contrib/shpgeo.c:268:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (stream_obj, psCShape->panPartStart, psCShape->nParts * sizeof (int) );
data/shapelib-1.5.0/contrib/shpgeo.c:269:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (stream_obj, psCShape->panPartType,  psCShape->nParts * sizeof (int) );
data/shapelib-1.5.0/contrib/shpgeo.c:272:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (stream_obj, psCShape->padfX, psCShape->nVertices * 2 * sizeof (double) );
data/shapelib-1.5.0/contrib/shpgeo.c:276:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (stream_obj, psCShape->padfZ, psCShape->nVertices * 2 * sizeof (double) );
data/shapelib-1.5.0/contrib/shpgeo.c:279:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (stream_obj, psCShape->padfM, psCShape->nVertices * 2 * sizeof (double) );
data/shapelib-1.5.0/contrib/shpgeo.c:307:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (stream_obj, psCShape, 4 * sizeof (int) );
data/shapelib-1.5.0/contrib/shpgeo.c:308:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (stream_obj, psCShape, 4 * sizeof (double) );
data/shapelib-1.5.0/contrib/shpgeo.c:310:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (stream_obj, psCShape, 2 * sizeof (double) );
data/shapelib-1.5.0/contrib/shpgeo.c:312:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (stream_obj, psCShape, 2 * sizeof (double) );
data/shapelib-1.5.0/contrib/shpgeo.c:314:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (stream_obj, psCShape, psCShape->nParts * 2 * sizeof (int) );
data/shapelib-1.5.0/contrib/shpgeo.c:315:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (stream_obj, psCShape, psCShape->nVertices * 2 * sizeof (double) );
data/shapelib-1.5.0/contrib/shpgeo.c:317:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (stream_obj, psCShape, psCShape->nVertices * 2 * sizeof (double) );
data/shapelib-1.5.0/contrib/shpgeo.c:319:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (stream_obj, psCShape, psCShape->nVertices * 2 * sizeof (double) );
data/shapelib-1.5.0/contrib/shpgeo.c:337:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
     memcpy ( &(wso->wStream[wso->StreamPos]), this, tsize * tcount );
data/shapelib-1.5.0/contrib/shpgeo.c:357:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
     memcpy ( this, &(wso->wStream[wso->StreamPos]), tsize * tcount );
data/shapelib-1.5.0/contrib/shpgeo.c:1423:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy ( psObject->panPartStart, psCShape->panPartStart, 
data/shapelib-1.5.0/contrib/shpgeo.c:1428:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy ( psObject->panPartType, 
data/shapelib-1.5.0/contrib/shpgeo.c:1453:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy ( psObject->padfX,
data/shapelib-1.5.0/contrib/shpgeo.c:1459:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy ( psObject->padfY, 
data/shapelib-1.5.0/contrib/shpgeo.c:1465:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy ( psObject->padfZ, 
data/shapelib-1.5.0/contrib/shpgeo.c:1471:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy ( psObject->padfM,
data/shapelib-1.5.0/contrib/shpgeo.c:1508:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	((unsigned char *) so)[i] = ((unsigned char *) in)[this_size-i-1];
data/shapelib-1.5.0/contrib/shpgeo.c:1508:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	((unsigned char *) so)[i] = ((unsigned char *) in)[this_size-i-1];
data/shapelib-1.5.0/contrib/shpgeo.c:1509:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	((unsigned char *) so)[this_size-i-1] = ((unsigned char *) in)[i];
data/shapelib-1.5.0/contrib/shpgeo.c:1509:53:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	((unsigned char *) so)[this_size-i-1] = ((unsigned char *) in)[i];
data/shapelib-1.5.0/contrib/shpgeo.c:1524:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char map[4] = {3,2,1,0};
data/shapelib-1.5.0/contrib/shpgeo.c:1543:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char map[8] = {7,6,5,4,3,2,1,0};
data/shapelib-1.5.0/contrib/shpinfo.c:64:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	sType [15]= "";
data/shapelib-1.5.0/contrib/shpinfo.c:89:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(sType,"Point");
data/shapelib-1.5.0/contrib/shpinfo.c:93:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(sType,"Polyline");
data/shapelib-1.5.0/contrib/shpinfo.c:97:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(sType,"Polygon");
data/shapelib-1.5.0/contrib/shpinfo.c:101:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(sType,"MultiPoint");
data/shapelib-1.5.0/contrib/shpsort.c:324:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  inFile = fopen(in, "rb");
data/shapelib-1.5.0/contrib/shpsort.c:333:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  outFile = fopen(out, "wb");
data/shapelib-1.5.0/contrib/shpwkb.c:54:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	kv[257] = "";
data/shapelib-1.5.0/contrib/shpwkb.c:55:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	idfldName[120] = "";
data/shapelib-1.5.0/contrib/shpwkb.c:56:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	fldName[120] = "";
data/shapelib-1.5.0/contrib/shpwkb.c:57:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	shpFileName[120] = "";
data/shapelib-1.5.0/contrib/shpwkb.c:58:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	dbfFileName[120] = "";
data/shapelib-1.5.0/contrib/shpwkb.c:82:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    wkb_file = fopen ( argv[2], "wb");
data/shapelib-1.5.0/dbfcreate.c:101:50:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    if( DBFAddField( hDBF, argv[i+1], FTString, atoi(argv[i+2]), 0 )
data/shapelib-1.5.0/dbfcreate.c:105:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		        argv[i+1], atoi(argv[i+2]) );
data/shapelib-1.5.0/dbfcreate.c:112:50:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    if( DBFAddField( hDBF, argv[i+1], FTDouble, atoi(argv[i+2]), 
data/shapelib-1.5.0/dbfcreate.c:113:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			      atoi(argv[i+3]) ) == -1 )
data/shapelib-1.5.0/dbfcreate.c:116:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		        argv[i+1], atoi(argv[i+2]), atoi(argv[i+3]) );
data/shapelib-1.5.0/dbfcreate.c:116:39:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		        argv[i+1], atoi(argv[i+2]), atoi(argv[i+3]) );
data/shapelib-1.5.0/dbfdump.c:91:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	szFormat[32], *pszFilename = NULL;
data/shapelib-1.5.0/dbfdump.c:96:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	szTitle[12];
data/shapelib-1.5.0/dbfdump.c:190:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf( szFormat, "%%-%ds ", panWidth[i] );
data/shapelib-1.5.0/dbfdump.c:192:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf( szFormat, "%%%ds ", panWidth[i] );
data/shapelib-1.5.0/dbfdump.c:225:25:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                        sprintf( szFormat, "%%-%ds", nWidth );
data/shapelib-1.5.0/dbfdump.c:227:25:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                        sprintf( szFormat, "%%%ds", nWidth );
data/shapelib-1.5.0/dbfdump.c:236:25:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                        sprintf( szFormat, "%%-%ds", nWidth );
data/shapelib-1.5.0/dbfdump.c:242:25:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                        sprintf( szFormat, "%%%dd", nWidth );
data/shapelib-1.5.0/dbfdump.c:248:25:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                        sprintf( szFormat, "%%%d.%dlf", nWidth, nDecimals );
data/shapelib-1.5.0/dbfdump.c:264:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf( szFormat, "%%-%ds", nWidth );
data/shapelib-1.5.0/dbfdump.c:275:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf( szFormat, "%%%ds", panWidth[i] - nWidth + 1 );
data/shapelib-1.5.0/dbfopen.c:293:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char	abyHeader[XBASE_FILEHDR_SZ] = { 0 };
data/shapelib-1.5.0/dbfopen.c:376:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char szMessage[128];
data/shapelib-1.5.0/dbfopen.c:415:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char szMessage[128];
data/shapelib-1.5.0/dbfopen.c:425:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char szMessage[128];
data/shapelib-1.5.0/dbfopen.c:446:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char		abyFileHeader[XBASE_FILEHDR_SZ];
data/shapelib-1.5.0/dbfopen.c:558:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pszFullname, pszFilename, nLenWithoutExtension);
data/shapelib-1.5.0/dbfopen.c:559:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pszFullname + nLenWithoutExtension, ".dbf", 5);
data/shapelib-1.5.0/dbfopen.c:563:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( &(psDBF->sHooks), psHooks, sizeof(SAHooks) );
data/shapelib-1.5.0/dbfopen.c:567:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pszFullname + nLenWithoutExtension, ".DBF", 5);
data/shapelib-1.5.0/dbfopen.c:571:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pszFullname + nLenWithoutExtension, ".cpg", 5);
data/shapelib-1.5.0/dbfopen.c:575:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pszFullname + nLenWithoutExtension, ".CPG", 5);
data/shapelib-1.5.0/dbfopen.c:643:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( psDBF->pszCodePage, pabyBuf, n + 1 );
data/shapelib-1.5.0/dbfopen.c:832:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pszFullname, pszFilename, nLenWithoutExtension);
data/shapelib-1.5.0/dbfopen.c:833:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pszFullname + nLenWithoutExtension, ".dbf", 5);
data/shapelib-1.5.0/dbfopen.c:855:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pszFullname + nLenWithoutExtension, ".cpg", 5);
data/shapelib-1.5.0/dbfopen.c:860:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            ldid = atoi( pszCodePage + 5 );
data/shapelib-1.5.0/dbfopen.c:883:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( &(psDBF->sHooks), psHooks, sizeof(SAHooks) );
data/shapelib-1.5.0/dbfopen.c:987:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szMessage[128];
data/shapelib-1.5.0/dbfopen.c:1007:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szMessage[128];
data/shapelib-1.5.0/dbfopen.c:1183:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( psDBF->pszWorkField,
data/shapelib-1.5.0/dbfopen.c:1195:39:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        psDBF->fieldValue.nIntField = atoi(psDBF->pszWorkField);
data/shapelib-1.5.0/dbfopen.c:1457:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	szSField[XBASE_FLD_MAX_WIDTH+1], szFormat[20];
data/shapelib-1.5.0/dbfopen.c:1750:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy ( pabyRec, pRawTuple,  psDBF->nRecordLength );
data/shapelib-1.5.0/dbfopen.c:1799:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy ( newDBF->pszHeader, psDBF->pszHeader, XBASE_FLDHDR_SZ * psDBF->nFields );
data/shapelib-1.5.0/dbfopen.c:1803:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy ( newDBF->panFieldOffset, psDBF->panFieldOffset, sizeof(int) * psDBF->nFields );
data/shapelib-1.5.0/dbfopen.c:1805:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy ( newDBF->panFieldSize, psDBF->panFieldSize, sizeof(int) * psDBF->nFields );
data/shapelib-1.5.0/dbfopen.c:1807:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy ( newDBF->panFieldDecimals, psDBF->panFieldDecimals, sizeof(int) * psDBF->nFields );
data/shapelib-1.5.0/dbfopen.c:1809:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy ( newDBF->pachFieldType, psDBF->pachFieldType, sizeof(char)*psDBF->nFields );
data/shapelib-1.5.0/dbfopen.c:1857:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char          name[XBASE_FLDNAME_LEN_READ+1];
data/shapelib-1.5.0/dbfopen.c:2117:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pszHeaderNew + i * XBASE_FLDHDR_SZ,
data/shapelib-1.5.0/dbfopen.c:2154:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(pszRecordNew + panFieldOffsetNew[i],
data/shapelib-1.5.0/dbfopen.c:2300:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(pszOldField, pszRecord + nOffset, nOldWidth);
data/shapelib-1.5.0/dbfopen.c:2367:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(pszOldField, pszRecord + nOffset, nOldWidth);
data/shapelib-1.5.0/safileio.c:95:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    return (SAFile) fopen( pszFilename, pszAccess );
data/shapelib-1.5.0/safileio.c:215:13:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    nWide = MultiByteToWideChar( CP_UTF8, 0, pszFilename, nMulti, 0, 0);
data/shapelib-1.5.0/safileio.c:225:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    if( MultiByteToWideChar( CP_UTF8, 0, pszFilename, nMulti, pwszFileName, nWide ) == 0 )
data/shapelib-1.5.0/sbnsearch.c:197:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &(hSBN->sHooks), psHooks, sizeof(SAHooks) );
data/shapelib-1.5.0/sbnsearch.c:228:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&hSBN->dfMinX, abyHeader + 32, 8);
data/shapelib-1.5.0/sbnsearch.c:229:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&hSBN->dfMinY, abyHeader + 40, 8);
data/shapelib-1.5.0/sbnsearch.c:230:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&hSBN->dfMaxX, abyHeader + 48, 8);
data/shapelib-1.5.0/sbnsearch.c:231:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&hSBN->dfMaxY, abyHeader + 56, 8);
data/shapelib-1.5.0/sbnsearch.c:256:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szErrorMsg[64];
data/shapelib-1.5.0/sbnsearch.c:306:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szErrorMsg[64];
data/shapelib-1.5.0/shpdump.c:128:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        nPrecision = atoi(argv[2]);
data/shapelib-1.5.0/shpopen.c:332:29:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define ByteCopy( a, b, c )	memcpy( b, a, c )
data/shapelib-1.5.0/shpopen.c:489:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szErrorMsg[200];
data/shapelib-1.5.0/shpopen.c:508:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szErrorMsg[200];
data/shapelib-1.5.0/shpopen.c:539:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szErrorMsg[200];
data/shapelib-1.5.0/shpopen.c:642:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( &(psSHP->sHooks), psHooks, sizeof(SAHooks) );
data/shapelib-1.5.0/shpopen.c:650:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pszFullname, pszLayer, nLenWithoutExtension);
data/shapelib-1.5.0/shpopen.c:651:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pszFullname + nLenWithoutExtension, ".shp", 5);
data/shapelib-1.5.0/shpopen.c:655:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pszFullname + nLenWithoutExtension, ".SHP", 5);
data/shapelib-1.5.0/shpopen.c:675:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pszFullname + nLenWithoutExtension, ".shx", 5);
data/shapelib-1.5.0/shpopen.c:679:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pszFullname + nLenWithoutExtension, ".SHX", 5);
data/shapelib-1.5.0/shpopen.c:750:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szErrorMsg[200];
data/shapelib-1.5.0/shpopen.c:785:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( &dValue, pabyBuf+36, 8 );
data/shapelib-1.5.0/shpopen.c:789:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( &dValue, pabyBuf+44, 8 );
data/shapelib-1.5.0/shpopen.c:793:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( &dValue, pabyBuf+52, 8 );
data/shapelib-1.5.0/shpopen.c:797:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( &dValue, pabyBuf+60, 8 );
data/shapelib-1.5.0/shpopen.c:801:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( &dValue, pabyBuf+68, 8 );
data/shapelib-1.5.0/shpopen.c:805:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( &dValue, pabyBuf+76, 8 );
data/shapelib-1.5.0/shpopen.c:809:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( &dValue, pabyBuf+84, 8 );
data/shapelib-1.5.0/shpopen.c:813:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( &dValue, pabyBuf+92, 8 );
data/shapelib-1.5.0/shpopen.c:837:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szErrorMsg[200];
data/shapelib-1.5.0/shpopen.c:865:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szErrorMsg[200];
data/shapelib-1.5.0/shpopen.c:895:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &nOffset, pabyBuf + i * 8, 4 );
data/shapelib-1.5.0/shpopen.c:898:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &nLength, pabyBuf + i * 8 + 4, 4 );
data/shapelib-1.5.0/shpopen.c:903:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char str[128];
data/shapelib-1.5.0/shpopen.c:915:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char str[128];
data/shapelib-1.5.0/shpopen.c:983:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char            abyReadedRecord[8];
data/shapelib-1.5.0/shpopen.c:1020:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pszFullname, pszLayer, nLenWithoutExtension);
data/shapelib-1.5.0/shpopen.c:1021:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pszFullname + nLenWithoutExtension, ".shp", 5);
data/shapelib-1.5.0/shpopen.c:1025:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pszFullname + nLenWithoutExtension, ".SHP", 5);
data/shapelib-1.5.0/shpopen.c:1058:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pszFullname + nLenWithoutExtension, ".shx", 5);
data/shapelib-1.5.0/shpopen.c:1062:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pszFullname + nLenWithoutExtension, ".SHX", 5);
data/shapelib-1.5.0/shpopen.c:1090:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( pabySHXHeader, pabyBuf, 100 );
data/shapelib-1.5.0/shpopen.c:1099:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( abyReadedRecord, &nRecordOffset, 4 );
data/shapelib-1.5.0/shpopen.c:1100:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( abyReadedRecord + 4, &nRecordLength, 4 );
data/shapelib-1.5.0/shpopen.c:1296:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pszFullname, pszLayer, nLenWithoutExtension);
data/shapelib-1.5.0/shpopen.c:1297:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pszFullname + nLenWithoutExtension, ".shp", 5);
data/shapelib-1.5.0/shpopen.c:1301:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szErrorMsg[200];
data/shapelib-1.5.0/shpopen.c:1310:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pszFullname + nLenWithoutExtension, ".shx", 5);
data/shapelib-1.5.0/shpopen.c:1314:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szErrorMsg[200];
data/shapelib-1.5.0/shpopen.c:1355:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szErrorMsg[200];
data/shapelib-1.5.0/shpopen.c:1374:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szErrorMsg[200];
data/shapelib-1.5.0/shpopen.c:1558:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(psObject->padfX, padfX, nSize);
data/shapelib-1.5.0/shpopen.c:1560:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(psObject->padfY, padfY, nSize);
data/shapelib-1.5.0/shpopen.c:1562:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(psObject->padfZ, padfZ, nSize);
data/shapelib-1.5.0/shpopen.c:1565:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(psObject->padfM, padfM, nSize);
data/shapelib-1.5.0/shpopen.c:1708:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( pabyRec + nRecordSize, psObject->panPartType,
data/shapelib-1.5.0/shpopen.c:1915:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char str[128];
data/shapelib-1.5.0/shpopen.c:1953:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szErrorMsg[200];
data/shapelib-1.5.0/shpopen.c:1966:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szErrorMsg[200];
data/shapelib-1.5.0/shpopen.c:2097:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                 szErrorMsg[128];
data/shapelib-1.5.0/shpopen.c:2118:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char str[128];
data/shapelib-1.5.0/shpopen.c:2132:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char str[128];
data/shapelib-1.5.0/shpopen.c:2142:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char str[128];
data/shapelib-1.5.0/shpopen.c:2191:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char str[128];
data/shapelib-1.5.0/shpopen.c:2233:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char str[128];
data/shapelib-1.5.0/shpopen.c:2255:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &nSHPContentLength, psSHP->pabyRec + 4, 4 );
data/shapelib-1.5.0/shpopen.c:2261:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char str[128];
data/shapelib-1.5.0/shpopen.c:2277:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char str[128];
data/shapelib-1.5.0/shpopen.c:2296:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( &nSHPType, psSHP->pabyRec + 8, 4 );
data/shapelib-1.5.0/shpopen.c:2350:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &(psShape->dfXMin), psSHP->pabyRec + 8 +  4, 8 );
data/shapelib-1.5.0/shpopen.c:2351:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &(psShape->dfYMin), psSHP->pabyRec + 8 + 12, 8 );
data/shapelib-1.5.0/shpopen.c:2352:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &(psShape->dfXMax), psSHP->pabyRec + 8 + 20, 8 );
data/shapelib-1.5.0/shpopen.c:2353:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &(psShape->dfYMax), psSHP->pabyRec + 8 + 28, 8 );
data/shapelib-1.5.0/shpopen.c:2364:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &nPoints, psSHP->pabyRec + 40 + 8, 4 );
data/shapelib-1.5.0/shpopen.c:2365:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &nParts, psSHP->pabyRec + 36 + 8, 4 );
data/shapelib-1.5.0/shpopen.c:2447:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( psShape->panPartStart, psSHP->pabyRec + 44 + 8, 4 * nParts );
data/shapelib-1.5.0/shpopen.c:2485:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( psShape->panPartType, psSHP->pabyRec + nOffset, 4*nParts );
data/shapelib-1.5.0/shpopen.c:2499:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(psShape->padfX + i,
data/shapelib-1.5.0/shpopen.c:2503:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(psShape->padfY + i,
data/shapelib-1.5.0/shpopen.c:2520:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( &(psShape->dfZMin), psSHP->pabyRec + nOffset, 8 );
data/shapelib-1.5.0/shpopen.c:2521:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( &(psShape->dfZMax), psSHP->pabyRec + nOffset + 8, 8 );
data/shapelib-1.5.0/shpopen.c:2528:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy( psShape->padfZ + i,
data/shapelib-1.5.0/shpopen.c:2548:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( &(psShape->dfMMin), psSHP->pabyRec + nOffset, 8 );
data/shapelib-1.5.0/shpopen.c:2549:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( &(psShape->dfMMax), psSHP->pabyRec + nOffset + 8, 8 );
data/shapelib-1.5.0/shpopen.c:2556:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy( psShape->padfM + i,
data/shapelib-1.5.0/shpopen.c:2590:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &nPoints, psSHP->pabyRec + 44, 4 );
data/shapelib-1.5.0/shpopen.c:2652:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(psShape->padfX+i, psSHP->pabyRec + 48 + 16 * i, 8 );
data/shapelib-1.5.0/shpopen.c:2653:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(psShape->padfY+i, psSHP->pabyRec + 48 + 16 * i + 8, 8 );
data/shapelib-1.5.0/shpopen.c:2664:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &(psShape->dfXMin), psSHP->pabyRec + 8 +  4, 8 );
data/shapelib-1.5.0/shpopen.c:2665:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &(psShape->dfYMin), psSHP->pabyRec + 8 + 12, 8 );
data/shapelib-1.5.0/shpopen.c:2666:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &(psShape->dfXMax), psSHP->pabyRec + 8 + 20, 8 );
data/shapelib-1.5.0/shpopen.c:2667:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &(psShape->dfYMax), psSHP->pabyRec + 8 + 28, 8 );
data/shapelib-1.5.0/shpopen.c:2679:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( &(psShape->dfZMin), psSHP->pabyRec + nOffset, 8 );
data/shapelib-1.5.0/shpopen.c:2680:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( &(psShape->dfZMax), psSHP->pabyRec + nOffset + 8, 8 );
data/shapelib-1.5.0/shpopen.c:2687:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy( psShape->padfZ + i,
data/shapelib-1.5.0/shpopen.c:2705:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( &(psShape->dfMMin), psSHP->pabyRec + nOffset, 8 );
data/shapelib-1.5.0/shpopen.c:2706:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( &(psShape->dfMMax), psSHP->pabyRec + nOffset + 8, 8 );
data/shapelib-1.5.0/shpopen.c:2713:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy( psShape->padfM + i,
data/shapelib-1.5.0/shpopen.c:2760:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( psShape->padfX, psSHP->pabyRec + 12, 8 );
data/shapelib-1.5.0/shpopen.c:2761:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( psShape->padfY, psSHP->pabyRec + 20, 8 );
data/shapelib-1.5.0/shpopen.c:2773:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( psShape->padfZ, psSHP->pabyRec + nOffset, 8 );
data/shapelib-1.5.0/shpopen.c:2788:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( psShape->padfM, psSHP->pabyRec + nOffset, 8 );
data/shapelib-1.5.0/shptest.c:270:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    if( atoi(argv[1]) == 0 )
data/shapelib-1.5.0/shptest.c:273:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    else if( atoi(argv[1]) == 1 )
data/shapelib-1.5.0/shptest.c:275:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    else if( atoi(argv[1]) == 2 )
data/shapelib-1.5.0/shptest.c:277:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    else if( atoi(argv[1]) == 3 )
data/shapelib-1.5.0/shptest.c:280:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    else if( atoi(argv[1]) == 4 )
data/shapelib-1.5.0/shptest.c:282:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    else if( atoi(argv[1]) == 5 )
data/shapelib-1.5.0/shptest.c:284:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    else if( atoi(argv[1]) == 6 )
data/shapelib-1.5.0/shptest.c:287:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    else if( atoi(argv[1]) == 7 )
data/shapelib-1.5.0/shptest.c:289:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    else if( atoi(argv[1]) == 8 )
data/shapelib-1.5.0/shptest.c:291:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    else if( atoi(argv[1]) == 9 )
data/shapelib-1.5.0/shptest.c:294:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    else if( atoi(argv[1]) == 10 )
data/shapelib-1.5.0/shptest.c:296:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    else if( atoi(argv[1]) == 11 )
data/shapelib-1.5.0/shptest.c:298:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    else if( atoi(argv[1]) == 12 )
data/shapelib-1.5.0/shptest.c:301:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    else if( atoi(argv[1]) == 13 )
data/shapelib-1.5.0/shptree.c:203:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( psTreeNode->adfBoundsMin, padfBoundsMin, sizeof(double) * 4 );
data/shapelib-1.5.0/shptree.c:206:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( psTreeNode->adfBoundsMax, padfBoundsMax, sizeof(double) * 4 );
data/shapelib-1.5.0/shptree.c:449:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( padfBoundsMin1, padfBoundsMinIn, sizeof(double) * 4 );
data/shapelib-1.5.0/shptree.c:450:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( padfBoundsMax1, padfBoundsMaxIn, sizeof(double) * 4 );
data/shapelib-1.5.0/shptree.c:451:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( padfBoundsMin2, padfBoundsMinIn, sizeof(double) * 4 );
data/shapelib-1.5.0/shptree.c:452:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( padfBoundsMax2, padfBoundsMaxIn, sizeof(double) * 4 );
data/shapelib-1.5.0/shptree.c:781:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(psTreeNode->adfBoundsMin, psSubNode->adfBoundsMin,
data/shapelib-1.5.0/shptree.c:783:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(psTreeNode->adfBoundsMax, psSubNode->adfBoundsMax,
data/shapelib-1.5.0/shptree.c:857:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &(hDiskTree->sHooks), psHooks, sizeof(SAHooks) );
data/shapelib-1.5.0/shptree.c:1076:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char abyBuf[16];
data/shapelib-1.5.0/shptree.c:1182:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( pabyRec, &offset, 4);
data/shapelib-1.5.0/shptree.c:1185:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( pabyRec+ 4, node->adfBoundsMin+0, sizeof(double) );
data/shapelib-1.5.0/shptree.c:1186:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( pabyRec+12, node->adfBoundsMin+1, sizeof(double) );
data/shapelib-1.5.0/shptree.c:1187:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( pabyRec+20, node->adfBoundsMax+0, sizeof(double) );
data/shapelib-1.5.0/shptree.c:1188:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( pabyRec+28, node->adfBoundsMax+1, sizeof(double) );
data/shapelib-1.5.0/shptree.c:1190:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( pabyRec+36, &node->nShapeCount, 4);
data/shapelib-1.5.0/shptree.c:1193:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( pabyRec+40, node->panShapeIds, j);
data/shapelib-1.5.0/shptree.c:1194:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( pabyRec+j+40, &node->nSubNodes, 4);
data/shapelib-1.5.0/shptree.c:1225:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char		signature[4] = "SQT";
data/shapelib-1.5.0/shptree.c:1227:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char		abyBuf[32];
data/shapelib-1.5.0/shptree.c:1258:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy( abyBuf+0, signature, 3 );
data/shapelib-1.5.0/shptreedump.c:125:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            nMaxDepth = atoi(argv[2]);
data/shapelib-1.5.0/shptreedump.c:181:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *fp = fopen( pszInputIndexFilename, "rb" );
data/shapelib-1.5.0/shptreedump.c:347:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	szNextPrefix[150];
data/shapelib-1.5.0/shptreedump.c:352:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
        strcat( szNextPrefix, "  " );
data/shapelib-1.5.0/shputils.c:104:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char            infile[80], outfile[80], temp[400];
data/shapelib-1.5.0/shputils.c:122:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char	iszTitle[12];
data/shapelib-1.5.0/shputils.c:123:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char	jszTitle[12];
data/shapelib-1.5.0/shputils.c:126:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char	iszFormat[32], iszField[1024];
data/shapelib-1.5.0/shputils.c:127:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char	jszFormat[32], jszField[1024];
data/shapelib-1.5.0/shputils.c:154:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char      selectitem[40], *cpt;
data/shapelib-1.5.0/shputils.c:166:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char    clipfile[80];
data/shapelib-1.5.0/shputils.c:216:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    	    tj = atoi(cpt);
data/shapelib-1.5.0/shputils.c:224:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                tj=atoi(cpt);
data/shapelib-1.5.0/shputils.c:661:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char      stmp[40],slow[40],shigh[40];
data/shapelib-1.5.0/shputils.c:726:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(stmp,"%%.%df to %%.%df \t(%%.%df)",iDecimals,iDecimals,iDecimals);
data/shapelib-1.5.0/shputils.c:729:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf(stmp,"= %%.%df",iDecimals);
data/shapelib-1.5.0/contrib/dbfcat.c:121:10:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    if ( mismatch && !force ) {
data/shapelib-1.5.0/contrib/shpdxf.c:223:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (dbfFileName, shpFileName, strlen(shpFileName)-3);
data/shapelib-1.5.0/contrib/shpdxf.c:223:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strncpy (dbfFileName, shpFileName, strlen(shpFileName)-3);
data/shapelib-1.5.0/contrib/shpdxf.c:226:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (dxfFileName, shpFileName,strlen(shpFileName)-3);
data/shapelib-1.5.0/contrib/shpdxf.c:226:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strncpy (dxfFileName, shpFileName,strlen(shpFileName)-3);
data/shapelib-1.5.0/contrib/shpgeo.c:155:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    for( i = strlen(pszBasename)-1; 
data/shapelib-1.5.0/contrib/shpsort.c:155:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = (int)strlen(fieldNames[i]);
data/shapelib-1.5.0/contrib/shpsort.c:317:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t name_len = strlen(inName);
data/shapelib-1.5.0/contrib/shpsort.c:318:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t old_len  = strlen(old_ext); 
data/shapelib-1.5.0/contrib/shpsort.c:319:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t new_len  = strlen(new_ext);
data/shapelib-1.5.0/contrib/shpsort.c:322:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(in, inName, (name_len - old_len));
data/shapelib-1.5.0/contrib/shpsort.c:329:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  name_len = strlen(outName);
data/shapelib-1.5.0/contrib/shpsort.c:331:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(out, outName, (name_len - old_len));
data/shapelib-1.5.0/contrib/shpsort.c:341:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while ((c = fgetc(inFile)) != EOF) {
data/shapelib-1.5.0/contrib/shpsort.c:352:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  char *dst = malloc(strlen(src) + 1);
data/shapelib-1.5.0/dbfdump.c:184:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if( (int) strlen(szTitle) > nWidth )
data/shapelib-1.5.0/dbfdump.c:185:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    panWidth[i] = strlen(szTitle);
data/shapelib-1.5.0/dbfopen.c:507:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int nLen = STATIC_CAST(int, strlen(pszBasename));
data/shapelib-1.5.0/dbfopen.c:650:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        psDBF->pszCodePage = STATIC_CAST(char *, malloc(strlen(REINTERPRET_CAST(char*, pabyBuf)) + 1));
data/shapelib-1.5.0/dbfopen.c:867:88:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            psHooks->FWrite( CONST_CAST(void*, STATIC_CAST(const void*, pszCodePage)), strlen(pszCodePage), 1, fpCPG );
data/shapelib-1.5.0/dbfopen.c:906:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        psDBF->pszCodePage = STATIC_CAST(char *, malloc( strlen(pszCodePage) + 1 ));
data/shapelib-1.5.0/dbfopen.c:1060:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy( pszFInfo, pszFieldName, XBASE_FLDNAME_LEN_WRITE );
data/shapelib-1.5.0/dbfopen.c:1339:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        return strlen(pszValue) == 0;
data/shapelib-1.5.0/dbfopen.c:1417:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy( pszFieldName, STATIC_CAST(char *,psDBF->pszHeader)+iField*XBASE_FLDHDR_SZ,
data/shapelib-1.5.0/dbfopen.c:1526:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if( STATIC_CAST(int,strlen(szSField)) > psDBF->panFieldSize[iField] )
data/shapelib-1.5.0/dbfopen.c:1531:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(REINTERPRET_CAST(char *, pabyRec+psDBF->panFieldOffset[iField]),
data/shapelib-1.5.0/dbfopen.c:1532:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            szSField, strlen(szSField) );
data/shapelib-1.5.0/dbfopen.c:1543:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if( STATIC_CAST(int, strlen(STATIC_CAST(char *,pValue))) > psDBF->panFieldSize[iField] )
data/shapelib-1.5.0/dbfopen.c:1552:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    j = STATIC_CAST(int, strlen(STATIC_CAST(char *,pValue)));
data/shapelib-1.5.0/dbfopen.c:1555:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(REINTERPRET_CAST(char *, pabyRec+psDBF->panFieldOffset[iField]),
data/shapelib-1.5.0/dbfopen.c:1615:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if( STATIC_CAST(int, strlen(STATIC_CAST(char *, pValue))) > psDBF->panFieldSize[iField] )
data/shapelib-1.5.0/dbfopen.c:1621:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        j = STATIC_CAST(int, strlen(STATIC_CAST(char *, pValue)));
data/shapelib-1.5.0/dbfopen.c:1624:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(REINTERPRET_CAST(char *, pabyRec+psDBF->panFieldOffset[iField]),
data/shapelib-1.5.0/dbfopen.c:2246:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy( pszFInfo, pszFieldName, XBASE_FLDNAME_LEN_WRITE );
data/shapelib-1.5.0/safileio.c:214:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    nMulti = strlen(pszFilename) + 1;
data/shapelib-1.5.0/shpadd.c:200:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        else if( i < argc-1-(int)strlen(tuple) )
data/shapelib-1.5.0/shpopen.c:578:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int nLen = STATIC_CAST(int, strlen(pszBasename));
data/shapelib-1.5.0/shpopen.c:661:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t nMessageLen = strlen(pszFullname)*2+256;
data/shapelib-1.5.0/shpopen.c:685:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t nMessageLen = strlen(pszFullname)*2+256;
data/shapelib-1.5.0/shpopen.c:1031:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t nMessageLen = strlen( pszFullname ) * 2 + 256;
data/shapelib-1.5.0/shpopen.c:1068:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t nMessageLen = strlen( pszFullname ) * 2 + 256;
data/shapelib-1.5.0/shptreedump.c:351:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if( strlen(pszPrefix) < sizeof(szNextPrefix) - 3 )
data/shapelib-1.5.0/shputils.c:197:9:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
        strcpy(outfile,"");
data/shapelib-1.5.0/shputils.c:558:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    for( i = strlen(pt)-1; 
data/shapelib-1.5.0/shputils.c:565:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(pt,".");
data/shapelib-1.5.0/shputils.c:679:13:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
            strcpy(slow, "~");
data/shapelib-1.5.0/shputils.c:680:13:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
            strcpy(shigh,"\0");
data/shapelib-1.5.0/shputils.c:683:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(stmp,DBFReadStringAttribute( hDBF, iRecord, i ),39);
data/shapelib-1.5.0/shputils.c:685:57:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    if (strncasecmp2(stmp,slow,0)  < 0) strncpy(slow, stmp,39);
data/shapelib-1.5.0/shputils.c:686:57:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    if (strncasecmp2(stmp,shigh,0) > 0) strncpy(shigh,stmp,39);
data/shapelib-1.5.0/shputils.c:689:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            pt=slow+strlen(slow)-1; 
data/shapelib-1.5.0/shputils.c:691:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            pt=shigh+strlen(shigh)-1;
data/shapelib-1.5.0/shputils.c:919:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   if (n<1) n=strlen(s1)+1;

ANALYSIS SUMMARY:

Hits = 409
Lines analyzed = 16014 in approximately 0.55 seconds (28930 lines/second)
Physical Source Lines of Code (SLOC) = 9201
Hits@level = [0] 358 [1]  53 [2] 300 [3]   0 [4]  56 [5]   0
Hits@level+ = [0+] 767 [1+] 409 [2+] 356 [3+]  56 [4+]  56 [5+]   0
Hits/KSLOC@level+ = [0+] 83.3605 [1+] 44.4517 [2+] 38.6914 [3+] 6.08629 [4+] 6.08629 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.