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/cproto-4.7q/trace.h
Examining data/cproto-4.7q/system.h
Examining data/cproto-4.7q/porting/getopt.h
Examining data/cproto-4.7q/porting/popen.c
Examining data/cproto-4.7q/porting/getopt.c
Examining data/cproto-4.7q/yyerror.c
Examining data/cproto-4.7q/semantic.h
Examining data/cproto-4.7q/cproto.c
Examining data/cproto-4.7q/symbol.c
Examining data/cproto-4.7q/symbol.h
Examining data/cproto-4.7q/lintlibs.c
Examining data/cproto-4.7q/cproto.h
Examining data/cproto-4.7q/semantic.c
Examining data/cproto-4.7q/dump.h
Examining data/cproto-4.7q/dump.c
Examining data/cproto-4.7q/testing/turboc.c
Examining data/cproto-4.7q/testing/linux.c
Examining data/cproto-4.7q/testing/solaris.c
Examining data/cproto-4.7q/testing/apollo.c
Examining data/cproto-4.7q/testing/syntax.c
Examining data/cproto-4.7q/trace.c
Examining data/cproto-4.7q/strkey.c

FINAL RESULTS:

data/cproto-4.7q/cproto.c:106:14:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
extern FILE *popen(const char *c, const char *m);
data/cproto-4.7q/cproto.c:183:12:  [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).
    return strcpy((char *) xMalloc(strlen(src) + 1, f, l), src);
data/cproto-4.7q/cproto.c:185:12:  [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).
    return strcpy((char *) xmalloc(strlen(src) + 1), src);
data/cproto-4.7q/cproto.c:400: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(dst, src);
data/cproto-4.7q/cproto.c:407:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(cpp_opt + strlen(cpp_opt), " /%s=(%s)", keyword, src);
data/cproto-4.7q/cproto.c:583:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(tmp, " -%c%s", c, optarg);
data/cproto-4.7q/cproto.c:584:6:  [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(cpp_opt, quote_string(tmp));
data/cproto-4.7q/cproto.c:871:16:  [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).
	    char *s = strcpy(temp, argv[i]);
data/cproto-4.7q/cproto.c:883:14:  [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).
		    (void) strcpy(temp, argv[i]);
data/cproto-4.7q/cproto.c:891:13:  [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).
	    (void) strcpy(temp, FileName);
data/cproto-4.7q/cproto.c:900:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		sprintf(cpp_cmd, cpp,
data/cproto-4.7q/cproto.c:902:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(cpp_cmd + strlen(cpp_cmd), "%s %s", cpp_opt, FileName);
data/cproto-4.7q/cproto.c:903:3:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		system(cpp_cmd);
data/cproto-4.7q/cproto.c:912:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(cpp_cmd, "%s%s %s", cpp, cpp_opt, FileName);
data/cproto-4.7q/cproto.c:915:9:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		inf = popen(cpp_cmd, "r");
data/cproto-4.7q/cproto.h:47: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 defined(GCC_PRINTF) && !defined(printf)
data/cproto-4.7q/cproto.h:48:55:  [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.
#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
data/cproto-4.7q/cproto.h:55:36:  [4] (buffer) scanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
#if defined(GCC_SCANF) && !defined(scanf)
data/cproto-4.7q/cproto.h:56:55:  [4] (buffer) scanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
data/cproto-4.7q/cproto.h:355:24:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
#define call_mktemp(s) mktemp(s)
data/cproto-4.7q/dump.c:11:27:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
#define PAD char pad[80]; sprintf(pad, "%-*s", level * 3, ".")
data/cproto-4.7q/dump.c:123:13:  [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).
	    (void) strcat(temp, table[j].text);
data/cproto-4.7q/lintlibs.c:342: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).
	(void) strcpy(old_file, cur_file_name());
data/cproto-4.7q/lintlibs.c:345: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).
	(void) strcpy(old_file, cur_file_name());
data/cproto-4.7q/lintlibs.c:386:30:  [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).
		make_inc_stack(in_include, strcpy(base_file, s));
data/cproto-4.7q/lintlibs.c:394: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).
	(void) strcpy(old_file, get_inc_stack(in_include));
data/cproto-4.7q/lintlibs.c:421:12:  [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).
    (void) strcat(implied_buf, s);
data/cproto-4.7q/porting/popen.c:17:1:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
popen (cmd, type)
data/cproto-4.7q/porting/popen.c:27:2:  [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(pipe_name, tmpdir);
data/cproto-4.7q/porting/popen.c:31: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(pipe_name, tmpnam(NULL));
data/cproto-4.7q/porting/popen.c:39:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(opt, "-o%s", pipe_name);
data/cproto-4.7q/semantic.c:67: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(result, a);
data/cproto-4.7q/semantic.c:69: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(result, b);
data/cproto-4.7q/semantic.c:81: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(result, a);
data/cproto-4.7q/semantic.c:82: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(result, b);
data/cproto-4.7q/semantic.c:421:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			    sprintf(temp, "(*%s)", p->declarator->name);
data/cproto-4.7q/semantic.c:436:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			(void) sprintf(u, "(%s)", t);
data/cproto-4.7q/system.h:66:9:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
#define popen _popen
data/cproto-4.7q/trace.c:59:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(fp, format, ap);
data/cproto-4.7q/trace.c:111:16:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (!(pp = popen(bfr, "r")))
data/cproto-4.7q/yyerror.c:173:2:  [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(tmp, t);
data/cproto-4.7q/cproto.c:13:12:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
extern int getopt(int argc, char *const *argv, const char *shortopts);
data/cproto-4.7q/cproto.c:527:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if ((s = getenv("CPROTO")) != NULL) {
data/cproto-4.7q/cproto.c:560:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((c = getopt(argc, argv, ALL_OPTIONS)) != EOF) {
data/cproto-4.7q/lintlibs.c:120:27:  [3] (buffer) getwd:
  This does not protect against buffer overflows by itself, so use with
  caution (CWE-120, CWE-20). Use getcwd instead.
    auto int len = strlen(getwd(stripped));
data/cproto-4.7q/porting/getopt.c:43:1:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
getopt(int argc, char **argv, const char *opts)
data/cproto-4.7q/porting/getopt.h:8:12:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
extern int getopt (int argc, char **argv, const char *options);
data/cproto-4.7q/porting/popen.c:24:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if ((tmpdir = getenv("TMP")) == NULL) {
data/cproto-4.7q/porting/popen.c:31:23:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
    strcat(pipe_name, tmpnam(NULL));
data/cproto-4.7q/system.h:153:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
extern char *getenv  (const char *v);
data/cproto-4.7q/cproto.c:514: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 **argv, *eargv[MAX_OPTIONS], **nargv;
data/cproto-4.7q/cproto.c:682: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).
	    proto_style = atoi(optarg);
data/cproto-4.7q/cproto.c:739:13:  [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.
	    (void) strcat(cpp_opt, " -C");	/* pass-through comments */
data/cproto-4.7q/cproto.c:743:29:  [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).
	    extern_in = (unsigned) atoi(optarg);
data/cproto-4.7q/cproto.c:870:6:  [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 temp[BUFSIZ];
data/cproto-4.7q/cproto.c:880: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.
		(void) strcpy(s, "XXXXXX.c");
data/cproto-4.7q/cproto.c:890:6:  [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 temp[BUFSIZ];
data/cproto-4.7q/cproto.c:901:16:  [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.
			call_mktemp(strcpy(temp, "sys$scratch:XXXXXX.i")));
data/cproto-4.7q/cproto.c:904:9:  [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).
		inf = fopen(temp, "r");
data/cproto-4.7q/cproto.c:914:7:  [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(cpp_cmd, " 2>/dev/null");
data/cproto-4.7q/cproto.c:923:14:  [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).
		if ((inf = fopen(argv[i], "r")) == NULL) {
data/cproto-4.7q/cproto.c:930:17:  [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).
	    if ((inf = fopen(argv[i], "r")) == NULL) {
data/cproto-4.7q/cproto.h:101: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 text[MAX_TEXT_SIZE];	/* source text */
data/cproto-4.7q/cproto.h:353:24:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
#define call_mktemp(s) mkstemp(s)
data/cproto-4.7q/dump.c:11: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.
#define PAD char pad[80]; sprintf(pad, "%-*s", level * 3, ".")
data/cproto-4.7q/dump.c:93: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.
    static char temp[100];
data/cproto-4.7q/lintlibs.c:119: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.
    static char stripped[BUFSIZ];
data/cproto-4.7q/lintlibs.c:303: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.
    static char old_file[MAX_TEXT_SIZE];	/* from last call */
data/cproto-4.7q/lintlibs.c:351: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 temp[80];
data/cproto-4.7q/lintlibs.c:377: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(temp, "/* lost sync @%d: ", cur_line_num() + 1);
data/cproto-4.7q/lintlibs.c:576: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.
    static char temp[80];
data/cproto-4.7q/lintlibs.c:577:12:  [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.
    (void) sprintf(temp, "p%d", count);
data/cproto-4.7q/porting/popen.c:12:8:  [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 pipe_name[FILENAME_MAX];	/* name of the temporary file */
data/cproto-4.7q/porting/popen.c:20: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 *tmpdir, *argv[30], **arg, *cmdline, *s, opt[FILENAME_MAX];
data/cproto-4.7q/porting/popen.c:66: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).
    return fopen(pipe_name, type) ;
data/cproto-4.7q/semantic.c:420:8:  [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 temp[20];
data/cproto-4.7q/testing/syntax.c:44:18:  [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).
extern int *asm (fopen, (__const char *__restrict __filename, __const char *__restrict __modes), fopen64);
data/cproto-4.7q/testing/syntax.c:45:21:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
extern int __asm__ (mkstemp, (char *__template), mkstemp64);
data/cproto-4.7q/testing/syntax.c:46:14:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
int __asm__ (mkstemp, (char *__template), mkstemp64);
data/cproto-4.7q/trace.c:53:7:  [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).
	fp = fopen("Trace.out", "w");
data/cproto-4.7q/trace.c:105: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.
    auto char bfr[BUFSIZ];
data/cproto-4.7q/trace.c:110:5:  [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(bfr, "/com/tb %d", getpid());
data/cproto-4.7q/yyerror.c:138: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 tmp[MSGLEN];
data/cproto-4.7q/yyerror.c:147: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.
		qsort((char *) vec, used, sizeof(vec[0]), compar);
data/cproto-4.7q/cproto.c:183:36:  [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 strcpy((char *) xMalloc(strlen(src) + 1, f, l), src);
data/cproto-4.7q/cproto.c:185:36:  [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 strcpy((char *) xmalloc(strlen(src) + 1), src);
data/cproto-4.7q/cproto.c:302: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).
    size_t n = strlen(s);
data/cproto-4.7q/cproto.c:399:2:  [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(dst, ",");
data/cproto-4.7q/cproto.c:407: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).
	sprintf(cpp_opt + strlen(cpp_opt), " /%s=(%s)", keyword, src);
data/cproto-4.7q/cproto.c:422: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).
    int len = strlen(s);
data/cproto-4.7q/cproto.c:470:25:  [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).
#define	quote_length(s) strlen(s)
data/cproto-4.7q/cproto.c:544: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).
    n = strlen(cpp) + 1;
data/cproto-4.7q/cproto.c:555: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).
    n += (2 + strlen(CPP) + BUFSIZ);
data/cproto-4.7q/cproto.c:798: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(progname) - 1; i >= 0; i--) {
data/cproto-4.7q/cproto.c:808: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).
    for (i = (int) strlen(progname) - 1; i >= 0; i--) {
data/cproto-4.7q/cproto.c:873: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).
	    int len = (int) strlen(temp);
data/cproto-4.7q/cproto.c:902: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).
		sprintf(cpp_cmd + strlen(cpp_cmd), "%s %s", cpp_opt, FileName);
data/cproto-4.7q/cproto.c:906:18:  [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 (cpp_len < (strlen(cpp) + strlen(cpp_opt) +
data/cproto-4.7q/cproto.c:906:32:  [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 (cpp_len < (strlen(cpp) + strlen(cpp_opt) +
data/cproto-4.7q/cproto.c:907:11:  [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).
			       strlen(FileName) + 100)) {
data/cproto-4.7q/cproto.c:908:18:  [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).
		    cpp_len = (strlen(cpp) + strlen(cpp_opt) +
data/cproto-4.7q/cproto.c:908:32:  [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).
		    cpp_len = (strlen(cpp) + strlen(cpp_opt) +
data/cproto-4.7q/cproto.c:909:11:  [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).
			       strlen(FileName) + 100);
data/cproto-4.7q/dump.c:122:10:  [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.
		(void) strcat(temp, ",");
data/cproto-4.7q/lintlibs.c:84:38:  [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).
    put_char(outf, (lintLibrary() && strlen(s) < 8) ? '\t' : ' ');
data/cproto-4.7q/lintlibs.c:120: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).
    auto int len = strlen(getwd(stripped));
data/cproto-4.7q/lintlibs.c:121: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(s) > len
data/cproto-4.7q/lintlibs.c:134:8:  [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 = strlen(inc_dir[n]);
data/cproto-4.7q/lintlibs.c:256:25:  [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 *last = path + strlen(path);
data/cproto-4.7q/lintlibs.c:412: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).
    implied_len += strlen(s);
data/cproto-4.7q/lintlibs.c:578:38:  [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).
    while (is_typedef_name(temp) && (strlen(temp) < sizeof(temp) - 1))
data/cproto-4.7q/lintlibs.c:579:9:  [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.
	(void) strcat(temp, "_");
data/cproto-4.7q/porting/popen.c:29:2:  [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(pipe_name, "/");
data/cproto-4.7q/semantic.c:66:31:  [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).
    result = (char *) xmalloc(strlen(a) + strlen(b) + 2);
data/cproto-4.7q/semantic.c:66:43:  [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).
    result = (char *) xmalloc(strlen(a) + strlen(b) + 2);
data/cproto-4.7q/semantic.c:68: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(result, " ");
data/cproto-4.7q/semantic.c:80:31:  [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).
    result = (char *) xmalloc(strlen(a) + strlen(b) + 2);
data/cproto-4.7q/semantic.c:80:43:  [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).
    result = (char *) xmalloc(strlen(a) + strlen(b) + 2);
data/cproto-4.7q/semantic.c:392:6:  [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(s2) < 8)
data/cproto-4.7q/semantic.c:435:25:  [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).
			u = (char *) xmalloc(strlen(t) + 3);
data/cproto-4.7q/semantic.c:643: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).
	    put_string(outf, t + strlen(declarator->name));
data/cproto-4.7q/semantic.c:698:8:  [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).
			s + strlen(declarator->name));
data/cproto-4.7q/semantic.c:701:8:  [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).
			s + strlen(declarator->name));
data/cproto-4.7q/strkey.c:20: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).
	size_t len = strlen(key);
data/cproto-4.7q/strkey.c:45:10:  [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).
	d = s + strlen(key);
data/cproto-4.7q/strkey.c:63:19:  [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 ((keylen = strlen(key)) == 0)
data/cproto-4.7q/trace.c:90:18:  [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 len = strlen(ref);
data/cproto-4.7q/yyerror.c:149: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).
	    k = MSGLEN - (int) (strlen(vec[used - 1]) + 2);
data/cproto-4.7q/yyerror.c:154:18:  [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).
		    x = (int) (strlen(s) + strlen(tag));
data/cproto-4.7q/yyerror.c:154: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).
		    x = (int) (strlen(s) + strlen(tag));
data/cproto-4.7q/yyerror.c:183:8:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		tt = strncpy(tmp, t + 2, sizeof(tmp) - 1);

ANALYSIS SUMMARY:

Hits = 131
Lines analyzed = 5301 in approximately 0.18 seconds (29368 lines/second)
Physical Source Lines of Code (SLOC) = 4085
Hits@level = [0]  36 [1]  47 [2]  34 [3]   9 [4]  41 [5]   0
Hits@level+ = [0+] 167 [1+] 131 [2+]  84 [3+]  50 [4+]  41 [5+]   0
Hits/KSLOC@level+ = [0+] 40.8813 [1+] 32.0685 [2+] 20.563 [3+] 12.2399 [4+] 10.0367 [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.