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/original-awk-2012-12-20/awk.h
Examining data/original-awk-2012-12-20/ytab.c
Examining data/original-awk-2012-12-20/ytab.h
Examining data/original-awk-2012-12-20/proto.h
Examining data/original-awk-2012-12-20/lex.c
Examining data/original-awk-2012-12-20/b.c
Examining data/original-awk-2012-12-20/main.c
Examining data/original-awk-2012-12-20/maketab.c
Examining data/original-awk-2012-12-20/parse.c
Examining data/original-awk-2012-12-20/lib.c
Examining data/original-awk-2012-12-20/run.c
Examining data/original-awk-2012-12-20/tran.c
Examining data/original-awk-2012-12-20/proctab.c

FINAL RESULTS:

data/original-awk-2012-12-20/awk.h:40:30:  [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	dprintf(x)	if (dbg) printf x
data/original-awk-2012-12-20/lib.c:196: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(inputFS, *FS);	/* for subsequent field splitting */
data/original-awk-2012-12-20/lib.c:286: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(inputFS, *FS);
data/original-awk-2012-12-20/lib.c:456:4:  [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(fr, rec);
data/original-awk-2012-12-20/lib.c:517: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(stderr, fmt, varg);
data/original-awk-2012-12-20/lib.c:570: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(stderr, fmt, varg);
data/original-awk-2012-12-20/lib.c:586: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(stderr, fmt, varg);
data/original-awk-2012-12-20/maketab.c:134:7:  [4] (buffer) sscanf:
  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.
		n = sscanf(buf, "%1c %s %s %d", &c, def, name, &tok);
data/original-awk-2012-12-20/maketab.c:142: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(names[tok-FIRSTTOKEN], name);
data/original-awk-2012-12-20/proto.h:194: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 *, const char *);
data/original-awk-2012-12-20/run.c:471:3:  [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(buf, s);
data/original-awk-2012-12-20/run.c:473:4:  [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(buf, *SUBSEP);
data/original-awk-2012-12-20/run.c:518:4:  [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(buf, s);	
data/original-awk-2012-12-20/run.c:520: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(buf, *SUBSEP);
data/original-awk-2012-12-20/run.c:557:3:  [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(buf, s);
data/original-awk-2012-12-20/run.c:560:4:  [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(buf, *SUBSEP);
data/original-awk-2012-12-20/run.c:895:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		case '?':	sprintf(p, "%s", fmt);	/* unknown, so dump it too */
data/original-awk-2012-12-20/run.c:902:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(p, "%s", t);
data/original-awk-2012-12-20/run.c:904:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		case 'f':	sprintf(p, fmt, getfval(x)); break;
data/original-awk-2012-12-20/run.c:905:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		case 'd':	sprintf(p, fmt, (long) getfval(x)); break;
data/original-awk-2012-12-20/run.c:906:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		case 'u':	sprintf(p, fmt, (int) getfval(x)); break;
data/original-awk-2012-12-20/run.c:914:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
			sprintf(p, fmt, t);
data/original-awk-2012-12-20/run.c:919:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
					sprintf(p, fmt, (int) getfval(x));
data/original-awk-2012-12-20/run.c:925:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
				sprintf(p, fmt, getsval(x)[0]);
data/original-awk-2012-12-20/run.c:1161: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(s, x->sval);
data/original-awk-2012-12-20/run.c:1162: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(s+n1, y->sval);
data/original-awk-2012-12-20/run.c:1518:18:  [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.
		u = (Awkfloat) system(getsval(x)) / 256;   /* 256 is unix-dep */
data/original-awk-2012-12-20/run.c:1688:8:  [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.
		fp = popen(s, "w");
data/original-awk-2012-12-20/run.c:1690:8:  [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.
		fp = popen(s, "r");
data/original-awk-2012-12-20/tran.c:382:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
			sprintf(s, *fmt, vp->fval);
data/original-awk-2012-12-20/tran.c:410: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(p, s);
data/original-awk-2012-12-20/main.c:73:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand(srand_seed);
data/original-awk-2012-12-20/run.c:1530:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		srand((unsigned int) u);
data/original-awk-2012-12-20/b.c:97:22:  [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.
		  && strcmp((const char *) fatab[i]->restr, s) == 0) {
data/original-awk-2012-12-20/lex.c:403: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.
			    {	char xbuf[100], *px;
data/original-awk-2012-12-20/lex.c:538: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	ebuf[300];
data/original-awk-2012-12-20/lex.c:540: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	yysbuf[100];	/* pushback buffer */
data/original-awk-2012-12-20/lib.c:43: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	inputFS[100] = " ";
data/original-awk-2012-12-20/lib.c:73: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[50];
data/original-awk-2012-12-20/lib.c:81: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(temp, "%d", i);
data/original-awk-2012-12-20/lib.c:145:23:  [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).
			else if ((infile = fopen(file, "r")) == NULL)
data/original-awk-2012-12-20/lib.c:232: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 *s, temp[50];
data/original-awk-2012-12-20/lib.c:235:2:  [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, "%d", n);
data/original-awk-2012-12-20/lib.c:310: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 buf[2];
data/original-awk-2012-12-20/main.c:51: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	*pfile[MAX_PFILE];	/* program filenames from -f's */
data/original-awk-2012-12-20/main.c:140: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).
			dbg = atoi(&argv[1][2]);
data/original-awk-2012-12-20/main.c:195: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).
			else if ((yyin = fopen(pfile[curpfile], "r")) == NULL)
data/original-awk-2012-12-20/maketab.c:110:7:  [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.
const char *table[SIZE];
data/original-awk-2012-12-20/maketab.c:111: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 *names[SIZE];
data/original-awk-2012-12-20/maketab.c:119: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 buf[200], name[200], def[200];
data/original-awk-2012-12-20/maketab.c:127: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).
	if ((fp = fopen("ytab.h", "r")) == NULL) {
data/original-awk-2012-12-20/proctab.c:5: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 *printname[93] = {
data/original-awk-2012-12-20/proctab.c:200: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.
	static char buf[100];
data/original-awk-2012-12-20/proctab.c:203: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(buf, "token %d", n);
data/original-awk-2012-12-20/run.c:836:11:  [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).
		fmtwd = atoi(s+1);
data/original-awk-2012-12-20/run.c:848: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(t-1, "%d", fmtwd=(int) getfval(x));
data/original-awk-2012-12-20/run.c:1215: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 *t, temp, num[50], *fs = 0;
data/original-awk-2012-12-20/run.c:1257: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(num, "%d", n);
data/original-awk-2012-12-20/run.c:1268: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(num, "%d", n);
data/original-awk-2012-12-20/run.c:1278: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(num, "%d", n);
data/original-awk-2012-12-20/run.c:1298:4:  [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(num, "%d", n);
data/original-awk-2012-12-20/run.c:1309: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 buf[2];
data/original-awk-2012-12-20/run.c:1311:4:  [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(num, "%d", n);
data/original-awk-2012-12-20/run.c:1327:4:  [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(num, "%d", n);
data/original-awk-2012-12-20/run.c:1683:8:  [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(s, "w");
data/original-awk-2012-12-20/run.c:1685:8:  [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(s, "a");
data/original-awk-2012-12-20/run.c:1692:38:  [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 = strcmp(s, "-") == 0 ? stdin : fopen(s, "r");	/* "-" is stdin */
data/original-awk-2012-12-20/tran.c:104: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[50];
data/original-awk-2012-12-20/tran.c:111: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(temp, "%d", i);
data/original-awk-2012-12-20/tran.c:289:11:  [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).
		fldno = atoi(vp->nval);
data/original-awk-2012-12-20/tran.c:328:11:  [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).
		fldno = atoi(vp->nval);
data/original-awk-2012-12-20/tran.c:367: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 s[100];	/* BUG: unchecked */
data/original-awk-2012-12-20/tran.c:380:4:  [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(s, "%.30g", vp->fval);
data/original-awk-2012-12-20/ytab.c:981: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.
	static char x[10];
data/original-awk-2012-12-20/ytab.c:986:2:  [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(x, "<%d>", yyc);
data/original-awk-2012-12-20/ytab.c:993: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.
	static char x[10];
data/original-awk-2012-12-20/ytab.c:998:2:  [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(x, "<%d>\n", yys);
data/original-awk-2012-12-20/b.c:807: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).
		n = 2 * strlen((const char *) prestr)+1;
data/original-awk-2012-12-20/lex.c:580: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).
	for (i = strlen(s)-1; i >= 0; i--)
data/original-awk-2012-12-20/lib.c:193: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(*FS) >= sizeof(inputFS))
data/original-awk-2012-12-20/lib.c:199:13:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c=getc(inf)) == '\n' && c != EOF)	/* skip leading \n's */
data/original-awk-2012-12-20/lib.c:205:13:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		for (; (c=getc(inf)) != sep && c != EOF; ) {
data/original-awk-2012-12-20/lib.c:213:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if ((c = getc(inf)) == '\n' || c == EOF) /* 2 in a row */
data/original-awk-2012-12-20/lib.c:277: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).
	n = strlen(r);
data/original-awk-2012-12-20/lib.c:287: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(inputFS) > 1) {	/* it's a regular expression */
data/original-awk-2012-12-20/lib.c:328:7:  [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(*RS) > 0)
data/original-awk-2012-12-20/lib.c:425: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).
	n = strlen(rec);
data/original-awk-2012-12-20/lib.c:450:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(fr, rec, patbeg-rec);
data/original-awk-2012-12-20/lib.c:474: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).
		if (!adjbuf(&record, &recsize, 1+strlen(p)+r-record, recsize, &r, "recbld 1"))
data/original-awk-2012-12-20/lib.c:479:37:  [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 (!adjbuf(&record, &recsize, 2+strlen(*OFS)+r-record, recsize, &r, "recbld 2"))
data/original-awk-2012-12-20/main.c:199:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if ((c = getc(yyin)) != EOF)
data/original-awk-2012-12-20/maketab.c:141: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).
		names[tok-FIRSTTOKEN] = (char *) malloc(strlen(name)+1);
data/original-awk-2012-12-20/run.c:459:13:  [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 nsub = strlen(*SUBSEP);
data/original-awk-2012-12-20/run.c:469: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 (!adjbuf(&buf, &bufsz, strlen(buf)+strlen(s)+nsub+1, recsize, 0, "array"))
data/original-awk-2012-12-20/run.c:469:41:  [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 (!adjbuf(&buf, &bufsz, strlen(buf)+strlen(s)+nsub+1, recsize, 0, "array"))
data/original-awk-2012-12-20/run.c:497:13:  [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 nsub = strlen(*SUBSEP);
data/original-awk-2012-12-20/run.c:516: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).
			if (!adjbuf(&buf, &bufsz, strlen(buf)+strlen(s)+nsub+1, recsize, 0, "awkdelete"))
data/original-awk-2012-12-20/run.c:516:42:  [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 (!adjbuf(&buf, &bufsz, strlen(buf)+strlen(s)+nsub+1, recsize, 0, "awkdelete"))
data/original-awk-2012-12-20/run.c:537:13:  [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 nsub = strlen(*SUBSEP);
data/original-awk-2012-12-20/run.c:555: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 (!adjbuf(&buf, &bufsz, strlen(buf)+strlen(s)+nsub+1, recsize, 0, "intest"))
data/original-awk-2012-12-20/run.c:555:41:  [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 (!adjbuf(&buf, &bufsz, strlen(buf)+strlen(s)+nsub+1, recsize, 0, "intest"))
data/original-awk-2012-12-20/run.c:744: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).
	k = strlen(s) + 1;
data/original-awk-2012-12-20/run.c:852: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).
				t = fmt + strlen(fmt);
data/original-awk-2012-12-20/run.c:897: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).
			n = strlen(t);
data/original-awk-2012-12-20/run.c:900: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).
			adjbuf(&buf, &bufsize, 1+strlen(p)+n+p-buf, recsize, &p, "format6");
data/original-awk-2012-12-20/run.c:901: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).
			p += strlen(p);
data/original-awk-2012-12-20/run.c:909: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).
			n = strlen(t);
data/original-awk-2012-12-20/run.c:931: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).
		p += strlen(p);
data/original-awk-2012-12-20/run.c:1155:7:  [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).
	n1 = strlen(x->sval);
data/original-awk-2012-12-20/run.c:1156:7:  [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).
	n2 = strlen(y->sval);
data/original-awk-2012-12-20/run.c:1239: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).
        if (arg3type == REGEXPR && strlen((char*)((fa*)a[2])->restr) == 0) {
data/original-awk-2012-12-20/run.c:1245: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).
	if (*s != '\0' && (strlen(fs) > 1 || arg3type == REGEXPR)) {	/* reg expr */
data/original-awk-2012-12-20/run.c:1491: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).
			u = strlen(getsval(x));
data/original-awk-2012-12-20/run.c:1552: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 (isrec(x) || strlen(getsval(x)) == 0) {
data/original-awk-2012-12-20/run.c:1818: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).
			adjbuf(&buf, &bufsz, 1+strlen(sptr)+pb-buf, 0, &pb, "sub");
data/original-awk-2012-12-20/run.c:1915: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).
		adjbuf(&buf, &bufsz, 1+strlen(sptr)+pb-buf, 0, &pb, "gsub");
data/original-awk-2012-12-20/tran.c:407: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).
	p = (char *) malloc(strlen(s)+1);
data/original-awk-2012-12-20/tran.c:421: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).
	if ((buf = (uschar *) malloc(strlen(is)+3)) == NULL)

ANALYSIS SUMMARY:

Hits = 118
Lines analyzed = 7736 in approximately 0.26 seconds (29284 lines/second)
Physical Source Lines of Code (SLOC) = 6857
Hits@level = [0]  55 [1]  41 [2]  44 [3]   2 [4]  31 [5]   0
Hits@level+ = [0+] 173 [1+] 118 [2+]  77 [3+]  33 [4+]  31 [5+]   0
Hits/KSLOC@level+ = [0+] 25.2297 [1+] 17.2087 [2+] 11.2294 [3+] 4.8126 [4+] 4.52093 [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.