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/dash-0.5.11+git20200708+dd9ef66/src/alias.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/alias.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/arith_yacc.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/arith_yacc.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/arith_yylex.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/bltin/bltin.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/bltin/test.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/bltin/times.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/bltin/printf.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/cd.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/cd.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/error.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/error.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/exec.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/expand.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/expand.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/init.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/input.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/input.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/jobs.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/jobs.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/machdep.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/mail.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/mail.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/main.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/memalloc.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/memalloc.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/miscbltin.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/miscbltin.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/mksignames.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/mksyntax.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/myhistedit.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/mystring.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/mystring.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/output.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/output.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/parser.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/parser.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/redir.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/redir.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/shell.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/show.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/show.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/system.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/system.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/trap.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/trap.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/exec.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/eval.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/eval.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/histedit.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/options.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/var.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/priv.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/priv.h
Examining data/dash-0.5.11+git20200708+dd9ef66/src/main.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/options.c
Examining data/dash-0.5.11+git20200708+dd9ef66/src/var.c

FINAL RESULTS:

data/dash-0.5.11+git20200708+dd9ef66/src/bltin/bltin.h:58: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.
#define printf out1fmt
data/dash-0.5.11+git20200708+dd9ef66/src/bltin/bltin.h:62:9:  [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.
#define fprintf outfmt
data/dash-0.5.11+git20200708+dd9ef66/src/bltin/printf.c:64: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.
		(void)printf(f, array[0], array[1], func); \
data/dash-0.5.11+git20200708+dd9ef66/src/bltin/printf.c:67: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.
		(void)printf(f, array[0], func); \
data/dash-0.5.11+git20200708+dd9ef66/src/bltin/printf.c:70: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.
		(void)printf(f, func); \
data/dash-0.5.11+git20200708+dd9ef66/src/exec.c:288: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(q, name);
data/dash-0.5.11+git20200708+dd9ef66/src/exec.c:694: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(cmdp->cmdname, name);
data/dash-0.5.11+git20200708+dd9ef66/src/histedit.c:343:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(editfile, "%s_shXXXXXX", _PATH_TMP);
data/dash-0.5.11+git20200708+dd9ef66/src/histedit.c:399:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(editcmd, "%s %s", editor, editfile);
data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c:212: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(line2, line);
data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c:274:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(line, "\n      /* from %s: */\n", fname);
data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c:481: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/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:173:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(decl, "union node *%s", name);
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:176:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(decl, "struct nodelist *%s", name);
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:179:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(decl, "char *%s", name);
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:182:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(decl, "int %s", name);
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:428:9:  [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.
	(void) vfprintf(stderr, msg, va);
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:446: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(p, s);
data/dash-0.5.11+git20200708+dd9ef66/src/mksyntax.c:131:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buf, "#define %s %d", synclass[i].name, i);
data/dash-0.5.11+git20200708+dd9ef66/src/mksyntax.c:140:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buf, "#define %s %#o", is_entry[i].name, 1 << i);
data/dash-0.5.11+git20200708+dd9ef66/src/mystring.h:63: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).
#define scopy(s1, s2)	((void)strcpy(s2, s1))
data/dash-0.5.11+git20200708+dd9ef66/src/output.c:426:8:  [4] (format) vsnprintf:
  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.
	ret = vsnprintf(outbuf, length, fmt, ap);
data/dash-0.5.11+git20200708+dd9ef66/src/output.h:106:27:  [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.
#define doformat(d, f, a)	vfprintf((d)->stream, (f), (a))
data/dash-0.5.11+git20200708+dd9ef66/src/show.c:276:9:  [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.
	(void) vfprintf(tracefile, fmt, va);
data/dash-0.5.11+git20200708+dd9ef66/src/show.c:285:9:  [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.
	(void) vfprintf(tracefile, fmt, va);
data/dash-0.5.11+git20200708+dd9ef66/src/bltin/bltin.h:77:9:  [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.
#define getenv(p) bltinlookup((p),0)
data/dash-0.5.11+git20200708+dd9ef66/src/histedit.c:224:14:  [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.
	      (ch = getopt(argc, argv, ":e:lnrs")) != -1)
data/dash-0.5.11+git20200708+dd9ef66/src/show.c:368:12:  [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 ((p = getenv(homestr)) == NULL) {
data/dash-0.5.11+git20200708+dd9ef66/src/arith_yacc.c:57: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.
static const char prec[ARITH_BINOP_MAX - ARITH_BINOP_MIN] = {
data/dash-0.5.11+git20200708+dd9ef66/src/bltin/printf.c:119:2:  [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(p + len, q, strspn(p + len, "X"));
data/dash-0.5.11+git20200708+dd9ef66/src/bltin/printf.c:375:2:  [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(copy, str, len - sizeof(PRIdMAX));
data/dash-0.5.11+git20200708+dd9ef66/src/bltin/printf.c:376:2:  [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(copy + len - sizeof(PRIdMAX), PRIdMAX, sizeof(PRIdMAX));
data/dash-0.5.11+git20200708+dd9ef66/src/cd.c:206: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 pathbuf[PATH_MAX];
data/dash-0.5.11+git20200708+dd9ef66/src/cd.c:277: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[PATH_MAX];
data/dash-0.5.11+git20200708+dd9ef66/src/exec.c:85: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 cmdname[ARB];	/* name of command */
data/dash-0.5.11+git20200708+dd9ef66/src/exec.c:162: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[128];
data/dash-0.5.11+git20200708+dd9ef66/src/exec.c:163:11:  [2] (misc) open:
  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).
	int fd = open(cmd, O_RDONLY|O_NOCTTY);
data/dash-0.5.11+git20200708+dd9ef66/src/expand.c:485: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[128];
data/dash-0.5.11+git20200708+dd9ef66/src/expand.c:941: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).
		num = atoi(name);
data/dash-0.5.11+git20200708+dd9ef66/src/expand.c:1512: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 name[10];
data/dash-0.5.11+git20200708+dd9ef66/src/expand.c:1742: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[len];
data/dash-0.5.11+git20200708+dd9ef66/src/histedit.c:160:18:  [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).
		   (histsize = atoi(hs)) < 0)
data/dash-0.5.11+git20200708+dd9ef66/src/histedit.c:194: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 editfile[MAXPATHLEN + 1];
data/dash-0.5.11+git20200708+dd9ef66/src/histedit.c:344:13:  [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).
		if ((fd = mkstemp(editfile)) < 0)
data/dash-0.5.11+git20200708+dd9ef66/src/histedit.c:463:7:  [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).
		i = atoi(s);
data/dash-0.5.11+git20200708+dd9ef66/src/input.c:66: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.
MKINIT char basebuf[IBUFSIZ];	/* buffer for top level input file */
data/dash-0.5.11+git20200708+dd9ef66/src/input.c:188: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(buf, rl_cp, nr);
data/dash-0.5.11+git20200708+dd9ef66/src/input.c:388:2:  [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(parsefile->lastc, sp->lastc, sizeof(sp->lastc));
data/dash-0.5.11+git20200708+dd9ef66/src/jobs.c:457: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[80];
data/dash-0.5.11+git20200708+dd9ef66/src/jobs.c:702: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).
		num = atoi(p);
data/dash-0.5.11+git20200708+dd9ef66/src/jobs.c:972:8:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
	pid = vfork();
data/dash-0.5.11+git20200708+dd9ef66/src/jobs.c:1110: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 s[48 + 1];
data/dash-0.5.11+git20200708+dd9ef66/src/jobs.c:1246: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[2];
data/dash-0.5.11+git20200708+dd9ef66/src/jobs.c:1411: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 cc[2] = " ";
data/dash-0.5.11+git20200708+dd9ef66/src/jobs.c:1416:15:  [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 const char vstype[VSTYPE + 1][4] = {
data/dash-0.5.11+git20200708+dd9ef66/src/memalloc.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 space[MINSIZE];
data/dash-0.5.11+git20200708+dd9ef66/src/memalloc.c:237:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		stacknxt = memcpy(p, oldspace, oldlen);
data/dash-0.5.11+git20200708+dd9ef66/src/miscbltin.c:226: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[18];
data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c:82: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 text[BLOCKSIZE];
data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c:139: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 *header_files[200];		/* list of header files */
data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c:188: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 line[1024];
data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c:209: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 line2[1024];
data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c:213: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(line2, undef, sizeof(undef) - 1);
data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c:270: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 line[1024];
data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c:331: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 line[1024];
data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c:458: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(file, mode)) == NULL) {
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:74: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 *nodename[MAXTYPES];	/* names of the nodes */
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:80: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 line[1024];
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:110: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 ((infp = fopen(argv[1], "r")) == NULL)
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:128: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 name[BUFLEN];
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:129: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 tag[BUFLEN];
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:158: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 name[BUFLEN];
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:159: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 type[BUFLEN];
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:160: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 decl[2 * BUFLEN];
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:219: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 ((patfile = fopen(file, "r")) == NULL)
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:221:15:  [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 ((hfile = fopen("nodes.h", "w")) == NULL)
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:223:15:  [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 ((cfile = fopen("nodes.c", "w")) == NULL)
data/dash-0.5.11+git20200708+dd9ef66/src/mksignames.c:37: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 *signal_names[2 * NSIG + 3];
data/dash-0.5.11+git20200708+dd9ef66/src/mksignames.c:111: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 (signal_names[rtmin+i], "RTMIN+%d", i);
data/dash-0.5.11+git20200708+dd9ef66/src/mksignames.c:114: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 (signal_names[rtmax-i], "RTMAX-%d", i);
data/dash-0.5.11+git20200708+dd9ef66/src/mksignames.c:122: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 (signal_names[rtmin+rtcnt+1], "RTMIN+%d", rtcnt+1);
data/dash-0.5.11+git20200708+dd9ef66/src/mksignames.c:359: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 (signal_names[i], "%d", i);
data/dash-0.5.11+git20200708+dd9ef66/src/mksignames.c:406: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).
  stream = fopen (stream_name, "w");
data/dash-0.5.11+git20200708+dd9ef66/src/mksyntax.c:93: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 *syntax[513];
data/dash-0.5.11+git20200708+dd9ef66/src/mksyntax.c:106: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[80];
data/dash-0.5.11+git20200708+dd9ef66/src/mksyntax.c:110:15:  [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 ((cfile = fopen("syntax.c", "w")) == NULL) {
data/dash-0.5.11+git20200708+dd9ef66/src/mksyntax.c:114:15:  [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 ((hfile = fopen("syntax.h", "w")) == NULL) {
data/dash-0.5.11+git20200708+dd9ef66/src/mystring.c:60: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 nullstr[1];		/* zero length string */
data/dash-0.5.11+git20200708+dd9ef66/src/mystring.c:238: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.
	return memcpy(stalloc(len), p, len);
data/dash-0.5.11+git20200708+dd9ef66/src/options.c:67: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.
static const char *const optnames[NOPTS] = {
data/dash-0.5.11+git20200708+dd9ef66/src/options.c:88: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 optletters[NOPTS] = {
data/dash-0.5.11+git20200708+dd9ef66/src/options.c:109: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 optlist[NOPTS];
data/dash-0.5.11+git20200708+dd9ef66/src/options.c:442: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[2];
data/dash-0.5.11+git20200708+dd9ef66/src/options.h:68: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.
extern const char optletters[NOPTS];
data/dash-0.5.11+git20200708+dd9ef66/src/options.h:69: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.
extern char optlist[NOPTS];
data/dash-0.5.11+git20200708+dd9ef66/src/output.c:417: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 dummy[1];
data/dash-0.5.11+git20200708+dd9ef66/src/parser.c:1364:3:  [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(str, stackblock(), savelen);
data/dash-0.5.11+git20200708+dd9ef66/src/parser.c:1447:3:  [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(out, str, savelen);
data/dash-0.5.11+git20200708+dd9ef66/src/parser.c:1509: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 msg[64];
data/dash-0.5.11+git20200708+dd9ef66/src/redir.c:124: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 memory[10];	/* file descriptors to write to memory */
data/dash-0.5.11+git20200708+dd9ef66/src/redir.c:293: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 memory[10];
data/dash-0.5.11+git20200708+dd9ef66/src/shell.h:74: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.
extern char nullstr[1];		/* null string */
data/dash-0.5.11+git20200708+dd9ef66/src/show.c:354: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];
data/dash-0.5.11+git20200708+dd9ef66/src/show.c:375:3:  [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(s, "/trace");
data/dash-0.5.11+git20200708+dd9ef66/src/show.c:384:44:  [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 (!(!fclose(tracefile) && (tracefile = fopen(s, "a")))) {
data/dash-0.5.11+git20200708+dd9ef66/src/show.c:391: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).
		if ((tracefile = fopen(s, "a")) == NULL) {
data/dash-0.5.11+git20200708+dd9ef66/src/system.c:67: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.
	return memcpy(dest, src, n) + n;
data/dash-0.5.11+git20200708+dd9ef66/src/system.c:93: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[19];
data/dash-0.5.11+git20200708+dd9ef66/src/system.c:96:11:  [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.
		return (char *)sys_siglist[sig];
data/dash-0.5.11+git20200708+dd9ef66/src/trap.c:69: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.
MKINIT char *trap[NSIG];
data/dash-0.5.11+git20200708+dd9ef66/src/trap.c:73: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 sigmode[NSIG - 1];
data/dash-0.5.11+git20200708+dd9ef66/src/trap.c:75: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 gotsig[NSIG - 1];
data/dash-0.5.11+git20200708+dd9ef66/src/trap.c:415: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).
		signo = atoi(string);
data/dash-0.5.11+git20200708+dd9ef66/src/var.c:82: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 linenovar[sizeof("LINENO=")+sizeof(int)*CHAR_BIT/3+1] = "LINENO=";
data/dash-0.5.11+git20200708+dd9ef66/src/var.c:129: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 ppid[32] = "PPID=";
data/dash-0.5.11+git20200708+dd9ef66/src/var.c:243: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[len];
data/dash-0.5.11+git20200708+dd9ef66/src/var.c:487:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		lvp->text = memcpy(p, optlist, sizeof(optlist));
data/dash-0.5.11+git20200708+dd9ef66/src/alias.c:221:7:  [1] (buffer) equal:
  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 (equal(name, (*app)->name)) {
data/dash-0.5.11+git20200708+dd9ef66/src/bltin/printf.c:464:17:  [1] (buffer) equal:
  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 (*++argv && equal(*argv, "-n")) {
data/dash-0.5.11+git20200708+dd9ef66/src/bltin/test.c:315: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).
			return strlen(*t_wp) == 0;
data/dash-0.5.11+git20200708+dd9ef66/src/bltin/test.c:317: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).
			return strlen(*t_wp) != 0;
data/dash-0.5.11+git20200708+dd9ef66/src/bltin/test.c:337: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).
	return strlen(*t_wp) > 0;
data/dash-0.5.11+git20200708+dd9ef66/src/cd.c:220: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).
	new = makestrspace(strlen(dir) + 2, new);
data/dash-0.5.11+git20200708+dd9ef66/src/exec.c:166:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int len = read(fd, buf, sizeof(buf));
data/dash-0.5.11+git20200708+dd9ef66/src/exec.c:281: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).
	qlen = len + strlen(name) + 2;
data/dash-0.5.11+git20200708+dd9ef66/src/exec.c:685:7:  [1] (buffer) equal:
  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 (equal(cmdp->cmdname, name))
data/dash-0.5.11+git20200708+dd9ef66/src/exec.c:691: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).
					+ strlen(name) + 1);
data/dash-0.5.11+git20200708+dd9ef66/src/expand.c:503:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		goto read;
data/dash-0.5.11+git20200708+dd9ef66/src/expand.c:506:1:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
read:
data/dash-0.5.11+git20200708+dd9ef66/src/expand.c:510:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			i = read(in.fd, buf, sizeof buf);
data/dash-0.5.11+git20200708+dd9ef66/src/expand.c:832: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(p);
data/dash-0.5.11+git20200708+dd9ef66/src/expand.c:1264: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).
		len = strlen(p);
data/dash-0.5.11+git20200708+dd9ef66/src/expand.c:1665: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).
		size_t fulllen = len + strlen(p) + 1;
data/dash-0.5.11+git20200708+dd9ef66/src/histedit.c:398: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).
		editcmd = stalloc(strlen(editor) + strlen(editfile) + 2);
data/dash-0.5.11+git20200708+dd9ef66/src/histedit.c:398: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).
		editcmd = stalloc(strlen(editor) + strlen(editfile) + 2);
data/dash-0.5.11+git20200708+dd9ef66/src/histedit.c:418: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 plen = strlen(p);
data/dash-0.5.11+git20200708+dd9ef66/src/input.c:198:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		nr = read(parsefile->fd, buf, IBUFSIZ - 1);
data/dash-0.5.11+git20200708+dd9ef66/src/input.c:344: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(s);
data/dash-0.5.11+git20200708+dd9ef66/src/input.c:448: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).
	parsefile->nleft = strlen(string);
data/dash-0.5.11+git20200708+dd9ef66/src/jobs.c:482: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).
		col += strlen("Running");
data/dash-0.5.11+git20200708+dd9ef66/src/jobs.c:1421:24:  [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).
	nextc = makestrspace((strlen(s) + 1) * 8, cmdnextc);
data/dash-0.5.11+git20200708+dd9ef66/src/main.c:125:23:  [1] (buffer) equal:
  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.
		 && (! attyset() || equal(termval(), "emacs"))
data/dash-0.5.11+git20200708+dd9ef66/src/memalloc.c:299: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).
	return stnputs(s, strlen(s), p);
data/dash-0.5.11+git20200708+dd9ef66/src/miscbltin.c:151:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		switch (read(0, &c, 1)) {
data/dash-0.5.11+git20200708+dd9ef66/src/miscbltin.c:220:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	mask = umask(0);
data/dash-0.5.11+git20200708+dd9ef66/src/miscbltin.c:221:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(mask);
data/dash-0.5.11+git20200708+dd9ef66/src/miscbltin.c:316:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		umask(new_mask);
data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c:161:9:  [1] (buffer) equal:
  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.
#define equal(s1, s2)	(strcmp(s1, s2) == 0)
data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c:281:7:  [1] (buffer) equal:
  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 (equal(line, "}\n"))
data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c:322:36:  [1] (buffer) equal:
  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.
	for (pp = header_files ; *pp && ! equal(*pp, name) ; pp++);
data/dash-0.5.11+git20200708+dd9ef66/src/mkinit.c:480: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).
	p = ckmalloc(strlen(s) + 1);
data/dash-0.5.11+git20200708+dd9ef66/src/mknodes.c:444: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 ((p = malloc(strlen(s) + 1)) == NULL)
data/dash-0.5.11+git20200708+dd9ef66/src/mksyntax.c:133: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 (pos = strlen(buf) ; pos < 32 ; pos = (pos + 8) & ~07)
data/dash-0.5.11+git20200708+dd9ef66/src/mksyntax.c:142: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 (pos = strlen(buf) ; pos < 32 ; pos = (pos + 8) & ~07)
data/dash-0.5.11+git20200708+dd9ef66/src/mksyntax.c:282: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).
		col += strlen(syntax[i]);
data/dash-0.5.11+git20200708+dd9ef66/src/mystring.c:237: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(p) + 1;
data/dash-0.5.11+git20200708+dd9ef66/src/mystring.h:62:9:  [1] (buffer) equal:
  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.
#define equal(s1, s2)	(strcmp(s1, s2) == 0)
data/dash-0.5.11+git20200708+dd9ef66/src/options.c:269:8:  [1] (buffer) equal:
  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 (equal(name, optnames[i])) {
data/dash-0.5.11+git20200708+dd9ef66/src/options.c:450: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 (ind <= 1 || off < 0 || strlen(optnext[-1]) < off)
data/dash-0.5.11+git20200708+dd9ef66/src/output.c:210: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(p);
data/dash-0.5.11+git20200708+dd9ef66/src/parser.c:914:22:  [1] (buffer) equal:
  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.
		 && attyset() && ! equal(termval(), "emacs")) {
data/dash-0.5.11+git20200708+dd9ef66/src/redir.c:353: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(p);
data/dash-0.5.11+git20200708+dd9ef66/src/system.c:74: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(src);
data/dash-0.5.11+git20200708+dd9ef66/src/system.c:85: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).
		p = (char *)s + strlen(s);
data/dash-0.5.11+git20200708+dd9ef66/src/var.c:220: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).
		vallen = strlen(val);

ANALYSIS SUMMARY:

Hits = 165
Lines analyzed = 19235 in approximately 0.55 seconds (35140 lines/second)
Physical Source Lines of Code (SLOC) = 13348
Hits@level = [0]  48 [1]  48 [2]  89 [3]   3 [4]  25 [5]   0
Hits@level+ = [0+] 213 [1+] 165 [2+] 117 [3+]  28 [4+]  25 [5+]   0
Hits/KSLOC@level+ = [0+] 15.9574 [1+] 12.3614 [2+] 8.76536 [3+] 2.09769 [4+] 1.87294 [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.