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/aoeui-1.7+20160302.git4e5dee9/all.h
Examining data/aoeui-1.7+20160302.git4e5dee9/bookmark.c
Examining data/aoeui-1.7+20160302.git4e5dee9/buffer.h
Examining data/aoeui-1.7+20160302.git4e5dee9/child.c
Examining data/aoeui-1.7+20160302.git4e5dee9/child.h
Examining data/aoeui-1.7+20160302.git4e5dee9/clip.c
Examining data/aoeui-1.7+20160302.git4e5dee9/clip.h
Examining data/aoeui-1.7+20160302.git4e5dee9/die.c
Examining data/aoeui-1.7+20160302.git4e5dee9/die.h
Examining data/aoeui-1.7+20160302.git4e5dee9/display-test.c
Examining data/aoeui-1.7+20160302.git4e5dee9/display.c
Examining data/aoeui-1.7+20160302.git4e5dee9/display.h
Examining data/aoeui-1.7+20160302.git4e5dee9/file.c
Examining data/aoeui-1.7+20160302.git4e5dee9/find.c
Examining data/aoeui-1.7+20160302.git4e5dee9/fold.c
Examining data/aoeui-1.7+20160302.git4e5dee9/help.c
Examining data/aoeui-1.7+20160302.git4e5dee9/keyword.c
Examining data/aoeui-1.7+20160302.git4e5dee9/locus.c
Examining data/aoeui-1.7+20160302.git4e5dee9/locus.h
Examining data/aoeui-1.7+20160302.git4e5dee9/macro.c
Examining data/aoeui-1.7+20160302.git4e5dee9/macro.h
Examining data/aoeui-1.7+20160302.git4e5dee9/main.c
Examining data/aoeui-1.7+20160302.git4e5dee9/mem.c
Examining data/aoeui-1.7+20160302.git4e5dee9/mem.h
Examining data/aoeui-1.7+20160302.git4e5dee9/mode.c
Examining data/aoeui-1.7+20160302.git4e5dee9/mode.h
Examining data/aoeui-1.7+20160302.git4e5dee9/rgba.h
Examining data/aoeui-1.7+20160302.git4e5dee9/search.c
Examining data/aoeui-1.7+20160302.git4e5dee9/tab.c
Examining data/aoeui-1.7+20160302.git4e5dee9/tags.c
Examining data/aoeui-1.7+20160302.git4e5dee9/text.c
Examining data/aoeui-1.7+20160302.git4e5dee9/text.h
Examining data/aoeui-1.7+20160302.git4e5dee9/types.h
Examining data/aoeui-1.7+20160302.git4e5dee9/undo.c
Examining data/aoeui-1.7+20160302.git4e5dee9/unicode.c
Examining data/aoeui-1.7+20160302.git4e5dee9/utf8.c
Examining data/aoeui-1.7+20160302.git4e5dee9/utf8.h
Examining data/aoeui-1.7+20160302.git4e5dee9/util.c
Examining data/aoeui-1.7+20160302.git4e5dee9/util.h
Examining data/aoeui-1.7+20160302.git4e5dee9/window.c
Examining data/aoeui-1.7+20160302.git4e5dee9/window.h
Examining data/aoeui-1.7+20160302.git4e5dee9/buffer.c

FINAL RESULTS:

data/aoeui-1.7+20160302.git4e5dee9/buffer.c:41:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buffer->path, "%s#", path);
data/aoeui-1.7+20160302.git4e5dee9/child.c:323:2:  [4] (shell) execvp:
  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.
	execvp(argv[0], (char *const *) argv);
data/aoeui-1.7+20160302.git4e5dee9/child.c:333:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(shell, X_OK))
data/aoeui-1.7+20160302.git4e5dee9/die.c:14: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, msg, ap);
data/aoeui-1.7+20160302.git4e5dee9/display-test.c:31:2:  [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.
	vsnprintf(buffer, sizeof buffer, format, ap);
data/aoeui-1.7+20160302.git4e5dee9/display-test.c:55: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, msg, ap);
data/aoeui-1.7+20160302.git4e5dee9/display.c:136:2:  [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.
	vsnprintf(buf, sizeof buf, msg, ap);
data/aoeui-1.7+20160302.git4e5dee9/file.c:84:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(apath, "%s%s", home, path + 1);
data/aoeui-1.7+20160302.git4e5dee9/file.c:91:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(apath, "%s/%s", cwd, path);
data/aoeui-1.7+20160302.git4e5dee9/file.c:273:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/%02d-%02d-%02d.%02d%02d%02d", dir,
data/aoeui-1.7+20160302.git4e5dee9/file.c:289:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(dir, "%s/.aoeui", home);
data/aoeui-1.7+20160302.git4e5dee9/file.c:293:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(dir, "/tmp/aoeui-%s", me);
data/aoeui-1.7+20160302.git4e5dee9/file.c:297:22:  [4] (misc) cuserid:
  Exactly what cuserid() does is poorly defined (e.g., some systems use the
  effective uid, like Linux, while others like System V use the real uid).
  Thus, you can't trust what it does. It's certainly not portable (The
  cuserid function was included in the 1988 version of POSIX, but removed
  from the 1990 version). Also, if passed a non-null parameter, there's a
  risk of a buffer overflow if the passed-in buffer is not at least L_cuserid
  characters long (CWE-120). Use getpwuid(geteuid()) and extract the desired
  information instead.
	if (fd < 0 && (me = cuserid(NULL))) {
data/aoeui-1.7+20160302.git4e5dee9/file.c:298:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(dir, "/tmp/aoeui-%s", me);
data/aoeui-1.7+20160302.git4e5dee9/file.c:394:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(save_path, "%s~", text->path);
data/aoeui-1.7+20160302.git4e5dee9/file.c:449:3:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		snprintf(cmd, sizeof cmd, make_writable, text->path);
data/aoeui-1.7+20160302.git4e5dee9/file.c:461:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(new_path, "%s@", text->path);
data/aoeui-1.7+20160302.git4e5dee9/tab.c:17:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(freestring, "%s%s", home, string+1);
data/aoeui-1.7+20160302.git4e5dee9/tab.c:44: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(new + length, dent->d_name + prefix_len);
data/aoeui-1.7+20160302.git4e5dee9/tags.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(path, currpath);
data/aoeui-1.7+20160302.git4e5dee9/tags.c:36:8:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if (!access(path, R_OK)) {
data/aoeui-1.7+20160302.git4e5dee9/tags.c:132: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(path, tags->text->path);
data/aoeui-1.7+20160302.git4e5dee9/tags.c:135: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(slash + 1, this);
data/aoeui-1.7+20160302.git4e5dee9/util.c:7:2:  [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.
	vsnprintf(buff, sizeof buff, msg, ap);
data/aoeui-1.7+20160302.git4e5dee9/child.c:332:22:  [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.
	const char *shell = getenv("SHELL");
data/aoeui-1.7+20160302.git4e5dee9/child.c:369:24:  [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 (!*dir && !(dir = getenv("HOME")))
data/aoeui-1.7+20160302.git4e5dee9/display.c:610:11:  [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.
	    (p = getenv("ROWS")) &&
data/aoeui-1.7+20160302.git4e5dee9/display.c:615:11:  [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.
	    (p = getenv("COLUMNS")) &&
data/aoeui-1.7+20160302.git4e5dee9/display.c:694: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 ((path = getenv("DISPLAY_DEBUG_PATH")) &&
data/aoeui-1.7+20160302.git4e5dee9/display.c:715:15:  [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 (!(term = getenv("TERM"))) {
data/aoeui-1.7+20160302.git4e5dee9/display.c:717:15:  [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 ((term = getenv("COLORTERM")) &&
data/aoeui-1.7+20160302.git4e5dee9/display.c:720:22:  [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.
		} else if ((term = getenv("TERM_PROGRAM")))
data/aoeui-1.7+20160302.git4e5dee9/file.c:82:41:  [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 (!strncmp(path, "~/", 2) && (home = getenv("HOME"))) {
data/aoeui-1.7+20160302.git4e5dee9/file.c:288: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 ((home = getenv("HOME"))) {
data/aoeui-1.7+20160302.git4e5dee9/file.c:292:22:  [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 (fd < 0 && (me = getenv("LOGNAME"))) {
data/aoeui-1.7+20160302.git4e5dee9/main.c:86: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.
		make_writable = getenv("AOEUI_WRITABLE");
data/aoeui-1.7+20160302.git4e5dee9/main.c:88:15:  [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 ((ch = getopt(argc, argv, "dkoqrsSt:uUw:")) >= 0)
data/aoeui-1.7+20160302.git4e5dee9/tab.c:15: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.
	    (home = getenv("HOME"))) {
data/aoeui-1.7+20160302.git4e5dee9/window.c:763: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.
		const char *p = getenv("AOEUI_OVERLAP");
data/aoeui-1.7+20160302.git4e5dee9/buffer.c:43:16:  [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).
		buffer->fd = open(buffer->path, O_CREAT|O_TRUNC|O_RDWR,
data/aoeui-1.7+20160302.git4e5dee9/buffer.c:143:19:  [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).
			anonymous_fd = open("/dev/zero", O_RDWR);
data/aoeui-1.7+20160302.git4e5dee9/buffer.c:159: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(p, old, buffer->payload);
data/aoeui-1.7+20160302.git4e5dee9/buffer.c:212: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, buffer->data + offset, before);
data/aoeui-1.7+20160302.git4e5dee9/buffer.c:220: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(out, buffer->data + offset, left);
data/aoeui-1.7+20160302.git4e5dee9/buffer.c:251: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(buffer->data + offset, in, bytes);
data/aoeui-1.7+20160302.git4e5dee9/child.c:240: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[8];
data/aoeui-1.7+20160302.git4e5dee9/child.c:244: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(single, buf, len);
data/aoeui-1.7+20160302.git4e5dee9/child.c:345: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.
	const char *argv[4];
data/aoeui-1.7+20160302.git4e5dee9/child.c:408: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.
	const char *shell, *p, *argv[8];
data/aoeui-1.7+20160302.git4e5dee9/child.c:461: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.
	const char *argv[4];
data/aoeui-1.7+20160302.git4e5dee9/display-test.c:28: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 buffer[256], *p;
data/aoeui-1.7+20160302.git4e5dee9/display.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 outbuf[OUTBUF_SIZE];
data/aoeui-1.7+20160302.git4e5dee9/display.c:121: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(display->outbuf + display->outbuf_bytes, str, bytes);
data/aoeui-1.7+20160302.git4e5dee9/display.c:133: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/aoeui-1.7+20160302.git4e5dee9/display.c:307: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[8];
data/aoeui-1.7+20160302.git4e5dee9/display.c:611: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).
	    (n = atoi(p)) &&
data/aoeui-1.7+20160302.git4e5dee9/display.c:616: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).
	    (n = atoi(p)) &&
data/aoeui-1.7+20160302.git4e5dee9/display.c:695: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).
	    !(debug_file = fopen(path, "w")))
data/aoeui-1.7+20160302.git4e5dee9/file.c:78: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(apath, path, pathlen);
data/aoeui-1.7+20160302.git4e5dee9/file.c:130: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 *raw, scratch[8];
data/aoeui-1.7+20160302.git4e5dee9/file.c:214:14:  [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).
		text->fd = open(path, O_CREAT|O_TRUNC|O_RDWR,
data/aoeui-1.7+20160302.git4e5dee9/file.c:227:15:  [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).
			text->fd = open(path, O_RDWR);
data/aoeui-1.7+20160302.git4e5dee9/file.c:231:15:  [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).
			text->fd = open(path, O_RDONLY);
data/aoeui-1.7+20160302.git4e5dee9/file.c:276:9:  [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).
	return open(path, O_CREAT|O_TRUNC|O_RDWR, S_IRUSR|S_IWUSR);
data/aoeui-1.7+20160302.git4e5dee9/file.c:281: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 dir[128], path[128];
data/aoeui-1.7+20160302.git4e5dee9/file.c:330:12:  [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).
	if ((fd = open(path, O_CREAT|O_RDWR,
data/aoeui-1.7+20160302.git4e5dee9/file.c:447: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 cmd[128];
data/aoeui-1.7+20160302.git4e5dee9/file.c:451: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).
		newfd = open(text->path, O_RDWR);
data/aoeui-1.7+20160302.git4e5dee9/file.c:463: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).
		newfd = open(new_path, O_CREAT|O_TRUNC|O_RDWR,
data/aoeui-1.7+20160302.git4e5dee9/file.c:484: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(text->clean, raw, bytes);
data/aoeui-1.7+20160302.git4e5dee9/find.c:238:16:  [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 signed char peer[256], updown[256];
data/aoeui-1.7+20160302.git4e5dee9/fold.c:7: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[8];
data/aoeui-1.7+20160302.git4e5dee9/help.c:4: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 *help[2] = {
data/aoeui-1.7+20160302.git4e5dee9/macro.c:112: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[8];
data/aoeui-1.7+20160302.git4e5dee9/main.c:112:12:  [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).
			value = atoi(optarg);
data/aoeui-1.7+20160302.git4e5dee9/mode.c:150: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 cbuf[16], *p = cbuf;
data/aoeui-1.7+20160302.git4e5dee9/mode.c:159: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(p, "\r\n", len = 2);
data/aoeui-1.7+20160302.git4e5dee9/mode.c:335:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		static char asdfg_to_aoeui[26] = {
data/aoeui-1.7+20160302.git4e5dee9/search.c:246: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(mode->pattern, last_search, mode->bytes+1);
data/aoeui-1.7+20160302.git4e5dee9/search.c:258: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(last_search, mode->pattern, mode->bytes);
data/aoeui-1.7+20160302.git4e5dee9/tab.c:23: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(new, string, length+1);
data/aoeui-1.7+20160302.git4e5dee9/tags.c:35:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(slash+1, "TAGS");
data/aoeui-1.7+20160302.git4e5dee9/tags.c:122: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).
	line = atoi(this);
data/aoeui-1.7+20160302.git4e5dee9/text.c:40: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(new, name, len+1);
data/aoeui-1.7+20160302.git4e5dee9/text.c:60: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(p, "<%d>", j);
data/aoeui-1.7+20160302.git4e5dee9/text.c:228: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(out, text->clean + offset, bytes);
data/aoeui-1.7+20160302.git4e5dee9/unicode.c:14: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[8];
data/aoeui-1.7+20160302.git4e5dee9/util.c:6: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 buff[1024];
data/aoeui-1.7+20160302.git4e5dee9/window.c:32: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 buff[128];
data/aoeui-1.7+20160302.git4e5dee9/window.c:766:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			overlap_percent = atoi(p);
data/aoeui-1.7+20160302.git4e5dee9/buffer.c:40: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).
		buffer->path = allocate(strlen(path) + 2);
data/aoeui-1.7+20160302.git4e5dee9/child.c:180:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			bytes = read(stream->fd, rdbuff, 1023);
data/aoeui-1.7+20160302.git4e5dee9/child.c:225: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).
		bytes = data ? strlen(data) : 0;
data/aoeui-1.7+20160302.git4e5dee9/child.c:356:48:  [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).
		multiplex_write(view->shell_std_in, command, strlen(command),
data/aoeui-1.7+20160302.git4e5dee9/display.c:128: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).
	out(display, str, strlen(str));
data/aoeui-1.7+20160302.git4e5dee9/display.c:846:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			n = read(0, display->inbuf + display->inbuf_bytes,
data/aoeui-1.7+20160302.git4e5dee9/file.c:43:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		got = read(text->fd, raw, max);
data/aoeui-1.7+20160302.git4e5dee9/file.c:69: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 (!(pathlen = strlen(path)))
data/aoeui-1.7+20160302.git4e5dee9/file.c:83: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).
		char *apath = allocate(strlen(home) + pathlen);
data/aoeui-1.7+20160302.git4e5dee9/file.c:90: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).
		char *apath = allocate(strlen(cwd) + pathlen + 2);
data/aoeui-1.7+20160302.git4e5dee9/file.c:393:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	save_path = allocate(strlen(text->path)+2);
data/aoeui-1.7+20160302.git4e5dee9/file.c:460: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).
		char *new_path = allocate(strlen(text->path) + 2);
data/aoeui-1.7+20160302.git4e5dee9/help.c:13:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	view_insert(view, help[is_asdfg], 0, strlen(help[is_asdfg]));
data/aoeui-1.7+20160302.git4e5dee9/keyword.c:203: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).
		size_t pathlen = strlen(text->path);
data/aoeui-1.7+20160302.git4e5dee9/keyword.c:206:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			size_t suffixlen = strlen(kwmap[j].suffix);
data/aoeui-1.7+20160302.git4e5dee9/search.c:243:17:  [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).
		mode->bytes = strlen(last_search);
data/aoeui-1.7+20160302.git4e5dee9/tab.c:16: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).
		freestring = allocate(strlen(home) + strlen(string));
data/aoeui-1.7+20160302.git4e5dee9/tab.c:16:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		freestring = allocate(strlen(home) + strlen(string));
data/aoeui-1.7+20160302.git4e5dee9/tab.c:21: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).
	length = strlen(string);
data/aoeui-1.7+20160302.git4e5dee9/tab.c:38: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).
			size_t dent_len = strlen(dent->d_name);
data/aoeui-1.7+20160302.git4e5dee9/tab.c:74: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 length = strlen(string);
data/aoeui-1.7+20160302.git4e5dee9/tags.c:24: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).
	char *path = allocate(strlen(currpath) + 8);
data/aoeui-1.7+20160302.git4e5dee9/tags.c:131: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).
		path = allocate(strlen(tags->text->path) + strlen(this) + 8);
data/aoeui-1.7+20160302.git4e5dee9/tags.c:131:46:  [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).
		path = allocate(strlen(tags->text->path) + strlen(this) + 8);
data/aoeui-1.7+20160302.git4e5dee9/tags.c:134: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).
			*(slash = path + strlen(path)) = '/';
data/aoeui-1.7+20160302.git4e5dee9/tags.c:151: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).
		locus_set(view, MARK, at + strlen(id));
data/aoeui-1.7+20160302.git4e5dee9/text.c:37: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(name);
data/aoeui-1.7+20160302.git4e5dee9/text.c:276: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).
		bytes = in ? strlen(in) : 0;
data/aoeui-1.7+20160302.git4e5dee9/window.c:53: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 len = strlen(buff);

ANALYSIS SUMMARY:

Hits = 119
Lines analyzed = 7634 in approximately 0.25 seconds (31119 lines/second)
Physical Source Lines of Code (SLOC) = 6640
Hits@level = [0]  12 [1]  29 [2]  51 [3]  15 [4]  24 [5]   0
Hits@level+ = [0+] 131 [1+] 119 [2+]  90 [3+]  39 [4+]  24 [5+]   0
Hits/KSLOC@level+ = [0+] 19.7289 [1+] 17.9217 [2+] 13.5542 [3+] 5.87349 [4+] 3.61446 [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.