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/policycoreutils-3.1/hll/pp/pp.c
Examining data/policycoreutils-3.1/load_policy/load_policy.c
Examining data/policycoreutils-3.1/newrole/hashtab.c
Examining data/policycoreutils-3.1/newrole/hashtab.h
Examining data/policycoreutils-3.1/newrole/newrole.c
Examining data/policycoreutils-3.1/run_init/open_init_pty.c
Examining data/policycoreutils-3.1/run_init/run_init.c
Examining data/policycoreutils-3.1/secon/secon.c
Examining data/policycoreutils-3.1/semodule/semodule.c
Examining data/policycoreutils-3.1/sestatus/sestatus.c
Examining data/policycoreutils-3.1/setfiles/restore.c
Examining data/policycoreutils-3.1/setfiles/restore.h
Examining data/policycoreutils-3.1/setfiles/restorecon_xattr.c
Examining data/policycoreutils-3.1/setfiles/setfiles.c
Examining data/policycoreutils-3.1/setsebool/setsebool.c

FINAL RESULTS:

data/policycoreutils-3.1/sestatus/sestatus.c:49:6:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	if (readlink(filename, buf, BUFSIZE) < 0)
data/policycoreutils-3.1/hll/pp/pp.c:35:24:  [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.
__attribute__ ((format(printf, 1, 2)))
data/policycoreutils-3.1/hll/pp/pp.c:40:6:  [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.
	if (vfprintf(stderr, fmt, argptr) < 0) {
data/policycoreutils-3.1/newrole/newrole.c:367:33:  [4] (misc) getpass:
  This function is obsolete and not portable. It was in SUSv2 but removed by
  POSIX.2. What it does exactly varies considerably between systems,
  particularly in where its prompt is displayed and where it gets its data
  (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations
  overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do
  exactly what you want. If you continue to use it, or write your own, be
  sure to zero the password as soon as possible to avoid leaving the
  cleartext password visible in the process' address space.
	if (!(unencrypted_password_s = getpass(PASSWORD_PROMPT))) {
data/policycoreutils-3.1/newrole/newrole.c:373:25:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	encrypted_password_s = crypt(unencrypted_password_s,
data/policycoreutils-3.1/newrole/newrole.c:1329:2:  [4] (shell) execv:
  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.
	execv(pw.pw_shell, argv + optind - 1);
data/policycoreutils-3.1/run_init/open_init_pty.c:295:7:  [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.
		if (execvp(argv[1], argv + 1)) {
data/policycoreutils-3.1/run_init/run_init.c:210:33:  [4] (misc) getpass:
  This function is obsolete and not portable. It was in SUSv2 but removed by
  POSIX.2. What it does exactly varies considerably between systems,
  particularly in where its prompt is displayed and where it gets its data
  (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations
  overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do
  exactly what you want. If you continue to use it, or write your own, be
  sure to zero the password as soon as possible to avoid leaving the
  cleartext password visible in the process' address space.
	if (!(unencrypted_password_s = getpass(PASSWORD_PROMPT))) {
data/policycoreutils-3.1/run_init/run_init.c:218:25:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	encrypted_password_s = crypt(unencrypted_password_s,
data/policycoreutils-3.1/run_init/run_init.c:417: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("/usr/sbin/open_init_pty", X_OK) != 0) {
data/policycoreutils-3.1/run_init/run_init.c:418:7:  [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.
		if (execvp(argv[1], argv + 1)) {
data/policycoreutils-3.1/run_init/run_init.c:432:6:  [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.
	if (execvp("/usr/sbin/open_init_pty", argv)) {
data/policycoreutils-3.1/semodule/semodule.c:496:9:  [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(output_path, F_OK) == 0) {
data/policycoreutils-3.1/sestatus/sestatus.c:47:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(filename, "%s/%d/exe", PROC_BASE, pid);
data/policycoreutils-3.1/sestatus/sestatus.c:175:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(buf, outp);
data/policycoreutils-3.1/setfiles/setfiles.c:140:35:  [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.
static int __attribute__ ((format(printf, 2, 3)))
data/policycoreutils-3.1/setfiles/setfiles.c:155:7:  [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.
	rc = vfprintf(out, fmt, ap);
data/policycoreutils-3.1/hll/pp/pp.c:83:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, "h", long_opts, NULL)) != -1) {
data/policycoreutils-3.1/load_policy/load_policy.c:36:16:  [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 ((opt = getopt(argc, argv, "bqi")) > 0) {
data/policycoreutils-3.1/newrole/newrole.c:491:13:  [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.
	term_env = getenv("TERM");
data/policycoreutils-3.1/newrole/newrole.c:492:16:  [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.
	display_env = getenv("DISPLAY");
data/policycoreutils-3.1/newrole/newrole.c:493: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.
	xauthority_env = getenv("XAUTHORITY");
data/policycoreutils-3.1/newrole/newrole.c:844:12:  [3] (buffer) getopt_long:
  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.
		clflag = getopt_long(argc, argv, "r:t:l:pV", long_options,
data/policycoreutils-3.1/secon/secon.c:201:20:  [3] (buffer) getopt_long:
  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 ((optchar = getopt_long(argc, argv, SECON_OPTS_GO,
data/policycoreutils-3.1/semodule/semodule.c:213:3:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		getopt_long(argc, argv, "s:b:hi:l::vr:u:RnNBDCPX:e:d:p:S:E:cH", opts,
data/policycoreutils-3.1/sestatus/sestatus.c:76:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	p = realpath(command, stackpath);
data/policycoreutils-3.1/sestatus/sestatus.c:208:9:  [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.
		opt = getopt(argc, argv, "vb");
data/policycoreutils-3.1/setfiles/restorecon_xattr.c:62:16:  [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 ((opt = getopt(argc, argv, "vnrmdDe:f:")) > 0) {
data/policycoreutils-3.1/setfiles/setfiles.c:243:16:  [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 ((opt = getopt(argc, argv, opts)) > 0) {
data/policycoreutils-3.1/setsebool/setsebool.c:42:12:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		clflag = getopt(argc, argv, "PNV");
data/policycoreutils-3.1/hll/pp/pp.c:95:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		in = fopen(ifile, "rb");
data/policycoreutils-3.1/hll/pp/pp.c:108:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		out = fopen(ofile, "w");
data/policycoreutils-3.1/newrole/newrole.c:310:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	cfg = fopen(config_file_path, "r");
data/policycoreutils-3.1/newrole/newrole.c:716:7:  [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).
	fd = open(ttyn, O_RDWR | O_NONBLOCK);
data/policycoreutils-3.1/newrole/newrole.c:1252:8:  [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).
		fd = open(ttyn, O_RDWR | O_NONBLOCK);
data/policycoreutils-3.1/newrole/newrole.c:1259:8:  [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).
		fd = open(ttyn, O_RDWR | O_NONBLOCK);
data/policycoreutils-3.1/newrole/newrole.c:1266:8:  [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).
		fd = open(ttyn, O_RDWR | O_NONBLOCK);
data/policycoreutils-3.1/run_init/open_init_pty.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 inbuf_mem[BUFSIZE];
data/policycoreutils-3.1/run_init/open_init_pty.c:241: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_mem[BUFSIZE];
data/policycoreutils-3.1/run_init/run_init.c:310: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[255], *bufp;
data/policycoreutils-3.1/run_init/run_init.c:312: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 context_file[PATH_MAX];
data/policycoreutils-3.1/run_init/run_init.c:315:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(context_file, "r");
data/policycoreutils-3.1/secon/secon.c:292: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).
			opts->f.pid = atoi(optarg);
data/policycoreutils-3.1/secon/secon.c:296: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).
			opts->f.pid = atoi(optarg);
data/policycoreutils-3.1/secon/secon.c:300: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).
			opts->f.pid = atoi(optarg);
data/policycoreutils-3.1/secon/secon.c:304: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).
			opts->f.pid = atoi(optarg);
data/policycoreutils-3.1/secon/secon.c:346: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[4096];
data/policycoreutils-3.1/secon/secon.c:353:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!(fp = fopen(buf, "rb")))
data/policycoreutils-3.1/secon/secon.c:389: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 dummy_NIL[1] = "";
data/policycoreutils-3.1/secon/secon.c:406: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[4096] = "";
data/policycoreutils-3.1/semodule/semodule.c:432:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				char output_path[PATH_MAX];
data/policycoreutils-3.1/semodule/semodule.c:502: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).
				output_fd = fopen(output_path, "w");
data/policycoreutils-3.1/sestatus/sestatus.c:41: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[BUFSIZE];
data/policycoreutils-3.1/sestatus/sestatus.c:42: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 filename[BUFSIZE];
data/policycoreutils-3.1/sestatus/sestatus.c:65: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 stackpath[PATH_MAX + 1], *p;
data/policycoreutils-3.1/sestatus/sestatus.c:98:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *fp = fopen(CONF, "r");
data/policycoreutils-3.1/sestatus/sestatus.c:99: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[255], *bufp;
data/policycoreutils-3.1/sestatus/sestatus.c:143:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(pc[*npc], bufp, buf_len);
data/policycoreutils-3.1/sestatus/sestatus.c:153:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(fc[*nfc], bufp, buf_len);
data/policycoreutils-3.1/sestatus/sestatus.c:173: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[20];
data/policycoreutils-3.1/sestatus/sestatus.c:186: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 *fc[MAX_CHECK];
data/policycoreutils-3.1/sestatus/sestatus.c:192: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 *pc[MAX_CHECK];
data/policycoreutils-3.1/setfiles/restorecon_xattr.c:146: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((&sha1_buf[i * 2]), "%02x", fc_digest[i]);
data/policycoreutils-3.1/setfiles/setfiles.c:254: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).
				policystream = fopen(policyfile, "r");
data/policycoreutils-3.1/setfiles/setfiles.c:461:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			f = fopen(input_filename, "r");
data/policycoreutils-3.1/setsebool/setsebool.c:72: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 *bool_list[1];
data/policycoreutils-3.1/newrole/newrole.c:125: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).
	if (!range || !strlen(range) || !newlevel || !strlen(newlevel))
data/policycoreutils-3.1/newrole/newrole.c:125: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).
	if (!range || !strlen(range) || !newlevel || !strlen(newlevel))
data/policycoreutils-3.1/newrole/newrole.c:138: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(newlevel) + 1 + strlen(tmpptr + 1) + 1;
data/policycoreutils-3.1/newrole/newrole.c:138:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(newlevel) + 1 + strlen(tmpptr + 1) + 1;
data/policycoreutils-3.1/newrole/newrole.c:148: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).
			len = strlen(newlevel) + 1 + strlen(range) + 1;
data/policycoreutils-3.1/newrole/newrole.c:148:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			len = strlen(newlevel) + 1 + strlen(range) + 1;
data/policycoreutils-3.1/newrole/newrole.c:239: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).
	size = strlen(keyp);
data/policycoreutils-3.1/newrole/newrole.c:375:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memset(unencrypted_password_s, 0, strlen(unencrypted_password_s));
data/policycoreutils-3.1/run_init/open_init_pty.c:153:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t n = read(fd, b->wptr, rb_space(b));
data/policycoreutils-3.1/run_init/run_init.c:220:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memset(unencrypted_password_s, 0, strlen(unencrypted_password_s));
data/policycoreutils-3.1/run_init/run_init.c:326: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).
		buf_len = strlen(buf);
data/policycoreutils-3.1/secon/secon.c:120: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).
		if ((strlen(def) > strlen("lt-"))
data/policycoreutils-3.1/secon/secon.c:120: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).
		if ((strlen(def) > strlen("lt-"))
data/policycoreutils-3.1/secon/secon.c:121: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).
		    && !memcmp("lt-", def, strlen("lt-")))
data/policycoreutils-3.1/secon/secon.c:562: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).
	int ansi_len = strlen("\e[99;99m") + 1;
data/policycoreutils-3.1/semodule/semodule.c:604: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).
						size = strlen(tmp);
data/policycoreutils-3.1/semodule/semodule.c:610: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).
						size = strlen(tmp);
data/policycoreutils-3.1/sestatus/sestatus.c:101: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).
	int proclen = strlen(PROCS);
data/policycoreutils-3.1/sestatus/sestatus.c:102: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).
	int filelen = strlen(FILES);
data/policycoreutils-3.1/sestatus/sestatus.c:113: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).
		buf_len = strlen(buf);
data/policycoreutils-3.1/sestatus/sestatus.c:266: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).
	root_path[strlen(root_path) - 1] = '\0';
data/policycoreutils-3.1/sestatus/sestatus.c:368:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				if (strlen(bools[i]) + 1 > COL)
data/policycoreutils-3.1/sestatus/sestatus.c:369: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).
					COL = strlen(bools[i]) + 1;
data/policycoreutils-3.1/setfiles/restore.c:89: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(globbuf.gl_pathv[i]) - 2;
data/policycoreutils-3.1/setfiles/setfiles.c:70:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(arg) == 1 && strncmp(arg, "/", 1) == 0) {
data/policycoreutils-3.1/setsebool/setsebool.c:78: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(argv[optind]) + strlen(argv[optind + 1]) + 2;
data/policycoreutils-3.1/setsebool/setsebool.c:78:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(argv[optind]) + strlen(argv[optind + 1]) + 2;

ANALYSIS SUMMARY:

Hits = 93
Lines analyzed = 6072 in approximately 1.02 seconds (5978 lines/second)
Physical Source Lines of Code (SLOC) = 4577
Hits@level = [0] 322 [1]  27 [2]  36 [3]  13 [4]  16 [5]   1
Hits@level+ = [0+] 415 [1+]  93 [2+]  66 [3+]  30 [4+]  17 [5+]   1
Hits/KSLOC@level+ = [0+] 90.6707 [1+] 20.319 [2+] 14.4199 [3+] 6.55451 [4+] 3.71422 [5+] 0.218484
Dot directories skipped = 2 (--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.