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/openrc-0.42/src/includes/queue.h
Examining data/openrc-0.42/src/includes/rc-misc.h
Examining data/openrc-0.42/src/includes/rc-wtmp.h
Examining data/openrc-0.42/src/includes/helpers.h
Examining data/openrc-0.42/src/libeinfo/einfo.h
Examining data/openrc-0.42/src/libeinfo/libeinfo.c
Examining data/openrc-0.42/src/librc/librc-daemon.c
Examining data/openrc-0.42/src/librc/librc-misc.c
Examining data/openrc-0.42/src/librc/librc-stringlist.c
Examining data/openrc-0.42/src/librc/librc.h
Examining data/openrc-0.42/src/librc/librc.c
Examining data/openrc-0.42/src/librc/librc-depend.c
Examining data/openrc-0.42/src/rc/_usage.c
Examining data/openrc-0.42/src/rc/_usage.h
Examining data/openrc-0.42/src/rc/broadcast.c
Examining data/openrc-0.42/src/rc/broadcast.h
Examining data/openrc-0.42/src/rc/checkpath.c
Examining data/openrc-0.42/src/rc/do_e.c
Examining data/openrc-0.42/src/rc/do_mark_service.c
Examining data/openrc-0.42/src/rc/do_service.c
Examining data/openrc-0.42/src/rc/do_value.c
Examining data/openrc-0.42/src/rc/fstabinfo.c
Examining data/openrc-0.42/src/rc/is_newer_than.c
Examining data/openrc-0.42/src/rc/is_older_than.c
Examining data/openrc-0.42/src/rc/kill_all.c
Examining data/openrc-0.42/src/rc/mountinfo.c
Examining data/openrc-0.42/src/rc/openrc-init.c
Examining data/openrc-0.42/src/rc/openrc-run.c
Examining data/openrc-0.42/src/rc/openrc-shutdown.c
Examining data/openrc-0.42/src/rc/rc-abort.c
Examining data/openrc-0.42/src/rc/rc-depend.c
Examining data/openrc-0.42/src/rc/rc-logger.c
Examining data/openrc-0.42/src/rc/rc-logger.h
Examining data/openrc-0.42/src/rc/rc-pipes.c
Examining data/openrc-0.42/src/rc/rc-pipes.h
Examining data/openrc-0.42/src/rc/rc-plugin.c
Examining data/openrc-0.42/src/rc/rc-plugin.h
Examining data/openrc-0.42/src/rc/rc-schedules.c
Examining data/openrc-0.42/src/rc/rc-schedules.h
Examining data/openrc-0.42/src/rc/rc-selinux.c
Examining data/openrc-0.42/src/rc/rc-selinux.h
Examining data/openrc-0.42/src/rc/rc-service.c
Examining data/openrc-0.42/src/rc/rc-status.c
Examining data/openrc-0.42/src/rc/rc-sysvinit.c
Examining data/openrc-0.42/src/rc/rc-sysvinit.h
Examining data/openrc-0.42/src/rc/rc-update.c
Examining data/openrc-0.42/src/rc/rc-wtmp.c
Examining data/openrc-0.42/src/rc/rc.c
Examining data/openrc-0.42/src/rc/shell_var.c
Examining data/openrc-0.42/src/rc/start-stop-daemon.c
Examining data/openrc-0.42/src/rc/supervise-daemon.c
Examining data/openrc-0.42/src/rc/swclock.c
Examining data/openrc-0.42/src/rc/rc-misc.c
Examining data/openrc-0.42/src/lsb2rcconf/main.c

FINAL RESULTS:

data/openrc-0.42/src/librc/librc-daemon.c:144:8:  [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.
		rc = readlink("/proc/self/ns/pid", my_ns, sizeof(my_ns)-1);
data/openrc-0.42/src/librc/librc-daemon.c:158:9:  [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.
			rc = readlink(buffer, proc_ns, sizeof(proc_ns)-1);
data/openrc-0.42/src/librc/librc.c:544:7:  [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.
		r = readlink(file, buffer, sizeof(buffer)-1);
data/openrc-0.42/src/rc/broadcast.c:66:3:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
		strncat(uidbuf, pwd->pw_name, sizeof(uidbuf) - 1);
data/openrc-0.42/src/rc/openrc-run.c:1155: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(argv[1], lnk, 4096-1)) {
data/openrc-0.42/src/includes/helpers.h:164: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.
	len = vsnprintf(ret, memlen, fmt, ap);
data/openrc-0.42/src/includes/helpers.h:173:9:  [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.
		len = vsnprintf(ret, len + 1, fmt, ap);
data/openrc-0.42/src/libeinfo/libeinfo.c:590:12:  [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.
	retval += vfprintf(f, fmt, ap) + 3;
data/openrc-0.42/src/librc/librc-daemon.c:523:10:  [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.
	path += snprintf(dirpath, sizeof(dirpath), RC_SVCDIR "/daemons/%s",
data/openrc-0.42/src/librc/librc-daemon.c:570: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(spidfile, ch_root);
data/openrc-0.42/src/librc/librc-daemon.c:571:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			strcat(spidfile, pidfile);
data/openrc-0.42/src/librc/librc-depend.c:1527:13:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	if (!(fp = popen(GENDEP, "r")))
data/openrc-0.42/src/librc/librc-misc.c:342:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf(path, "%s/%s", RC_CONF_D, fname->value);
data/openrc-0.42/src/librc/librc.c:534:2:  [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(file, sizeof(file), RC_SVCDIR "/%s/%s", "started", service);
data/openrc-0.42/src/librc/librc.c:536: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(file, sizeof(file), RC_SVCDIR "/%s/%s",
data/openrc-0.42/src/librc/librc.c:551:2:  [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(file, sizeof(file), RC_LOCAL_INITDIR "/%s", service);
data/openrc-0.42/src/librc/librc.c:557:2:  [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(file, sizeof(file), RC_INITDIR "/%s", service);
data/openrc-0.42/src/librc/librc.c:563:2:  [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(file, sizeof(file), RC_PKG_INITDIR "/%s", service);
data/openrc-0.42/src/librc/librc.c:620:2:  [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, l, OPTSTR, svc);
data/openrc-0.42/src/librc/librc.c:623:12:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	if ((fp = popen(cmd, "r"))) {
data/openrc-0.42/src/librc/librc.c:659:2:  [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, l, DESCSTR, svc, *option ? "_" : "", option);
data/openrc-0.42/src/librc/librc.c:661:12:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	if ((fp = popen(cmd, "r"))) {
data/openrc-0.42/src/librc/librc.c:674:2:  [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(file, sizeof(file), RC_RUNLEVELDIR "/%s/%s",
data/openrc-0.42/src/librc/librc.c:704: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(file, sizeof(file), RC_SVCDIR "/%s/%s",
data/openrc-0.42/src/librc/librc.c:731:4:  [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(file, sizeof(file), RC_SVCDIR "/%s/%s",
data/openrc-0.42/src/librc/librc.c:738:6:  [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(was, sizeof(was),
data/openrc-0.42/src/librc/librc.c:759: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(file, sizeof(file), RC_SVCDIR "/%s/%s",
data/openrc-0.42/src/librc/librc.c:766: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(file, sizeof(file), RC_SVCDIR "/%s/%s",
data/openrc-0.42/src/librc/librc.c:770: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(file, sizeof(file), RC_SVCDIR "/%s/%s",
data/openrc-0.42/src/librc/librc.c:779: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(file, sizeof(file), RC_SVCDIR "/%s", "scheduled");
data/openrc-0.42/src/librc/librc.c:809: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(file, sizeof(file), RC_SVCDIR "/%s/%s",
data/openrc-0.42/src/librc/librc.c:826:4:  [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(file, sizeof(file),
data/openrc-0.42/src/librc/librc.c:847:2:  [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(file, sizeof(file), RC_SVCDIR "/options/%s/%s",
data/openrc-0.42/src/librc/librc.c:862:7:  [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.
	p += snprintf(file, sizeof(file), RC_SVCDIR "/options/%s", service);
data/openrc-0.42/src/librc/librc.c:891:7:  [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.
	p += snprintf(file, sizeof(file), RC_SVCDIR "/scheduled/%s",
data/openrc-0.42/src/librc/librc.c:909:2:  [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(dir, sizeof(dir), RC_SVCDIR "/scheduled/%s",
data/openrc-0.42/src/librc/librc.c:945: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(dir, sizeof(dir), RC_RUNLEVELDIR "/%s", runlevel);
data/openrc-0.42/src/librc/librc.c:979:7:  [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.
	p += snprintf(dir, sizeof(dir), RC_SVCDIR "/%s",
data/openrc-0.42/src/librc/librc.c:1023:2:  [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(file, sizeof(file), RC_RUNLEVELDIR "/%s/%s",
data/openrc-0.42/src/librc/librc.c:1038: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(binit, sizeof(binit), RC_INITDIR "/%s", service);
data/openrc-0.42/src/librc/librc.c:1052:2:  [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(file, sizeof(file), RC_RUNLEVELDIR "/%s/%s",
data/openrc-0.42/src/librc/librc.c:1068: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(file, sizeof(file), RC_SVCDIR "/scheduled/%s/%s",
data/openrc-0.42/src/librc/librc.c:1082:2:  [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(dir, sizeof(dir), RC_SVCDIR "/scheduled/%s",
data/openrc-0.42/src/lsb2rcconf/main.c:638: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(initdscript, R_OK)) {
data/openrc-0.42/src/rc/fstabinfo.c:143:3:  [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], argv);
data/openrc-0.42/src/rc/kill_all.c:68:4:  [4] (shell) execlp:
  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.
			execlp("mount", "mount", "-t", "proc", "proc", "/proc", NULL);
data/openrc-0.42/src/rc/openrc-init.c:68:4:  [4] (shell) execlp:
  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.
			execlp("openrc", "openrc", runlevel, NULL);
data/openrc-0.42/src/rc/openrc-init.c:103:2:  [4] (shell) execlp:
  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.
	execlp(my_name, my_name, "reexec", NULL);
data/openrc-0.42/src/rc/openrc-init.c:140:3:  [4] (shell) execl:
  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.
		execl(prog, prog, (char *)NULL);
data/openrc-0.42/src/rc/openrc-init.c:161:3:  [4] (shell) execlp:
  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.
		execlp("halt", "halt", "-f", (char *) NULL);
data/openrc-0.42/src/rc/openrc-init.c:240:5:  [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(argv[0], argv);
data/openrc-0.42/src/rc/openrc-run.c:402:4:  [4] (shell) execl:
  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.
			execl(RC_SVCDIR "/openrc-run.sh",
data/openrc-0.42/src/rc/openrc-run.c:419:4:  [4] (shell) execl:
  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.
			execl(RC_LIBEXECDIR "/sh/openrc-run.sh",
data/openrc-0.42/src/rc/rc-misc.c:309:3:  [4] (shell) execl:
  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.
		execl("/sbin/openrc-run", "/sbin/openrc-run", file, "--lockfd", sfd, arg, (char *) NULL);
data/openrc-0.42/src/rc/rc-misc.c:352: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(path, W_OK) == 0)
data/openrc-0.42/src/rc/rc-pipes.c:52:3:  [4] (shell) execl:
  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.
		execl("/bin/sh", "sh", "-c", cmd, NULL);
data/openrc-0.42/src/rc/rc-selinux.c:192:12:  [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.
	attempt = getpass(PASSWORD_PROMPT);
data/openrc-0.42/src/rc/rc-selinux.c:210:13:  [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.
	password = crypt(attempt, spw->sp_pwdp);
data/openrc-0.42/src/rc/rc-selinux.c:404:7:  [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)) {
data/openrc-0.42/src/rc/rc-selinux.c:405: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("/usr/sbin/open_init_pty", argv)) {
data/openrc-0.42/src/rc/rc-selinux.c:409:13:  [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.
	} else if (execvp(argv[1], argv + 1)) {
data/openrc-0.42/src/rc/rc-service.c:168: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(*argv, argv);
data/openrc-0.42/src/rc/rc.c:258:3:  [4] (shell) execl:
  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.
		execl(prog, prog, (char *)NULL);
data/openrc-0.42/src/rc/rc.c:282:3:  [4] (shell) execlp:
  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.
		execlp("halt", "halt", "-f", (char *) NULL);
data/openrc-0.42/src/rc/rc.c:474: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(BRANDING " (%s)", uts.machine);
data/openrc-0.42/src/rc/rc.c:716:9:  [4] (shell) execlp:
  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.
		_exit(execlp("gdb", "gdb", "--quiet", "--pid", pid,
data/openrc-0.42/src/rc/rc.c:808:4:  [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(*argv, argv);
data/openrc-0.42/src/rc/start-stop-daemon.c:951:3:  [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(exec, argv);
data/openrc-0.42/src/rc/supervise-daemon.c:177:2:  [4] (shell) execlp:
  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.
	execlp("supervise-daemon", "supervise-daemon", svcname, "--reexec",
data/openrc-0.42/src/rc/supervise-daemon.c:264:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(cmdline, *c);
data/openrc-0.42/src/rc/supervise-daemon.c:306:3:  [4] (shell) execl:
  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.
		execl(file, file, cmd, (char *) NULL);
data/openrc-0.42/src/rc/supervise-daemon.c:493: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(exec, argv);
data/openrc-0.42/src/rc/supervise-daemon.c:574:10:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
				if ((sscanf(buf, "%s %d", cmd, &sig_send) == 2)
data/openrc-0.42/src/libeinfo/libeinfo.c:232: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.
	return yesno(getenv("EINFO_QUIET"));
data/openrc-0.42/src/libeinfo/libeinfo.c:238: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.
	return yesno(getenv("EERROR_QUIET"));
data/openrc-0.42/src/libeinfo/libeinfo.c:244: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.
	return yesno(getenv ("EINFO_VERBOSE"));
data/openrc-0.42/src/libeinfo/libeinfo.c:331: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 (noyes(getenv("EINFO_COLOR")))
data/openrc-0.42/src/libeinfo/libeinfo.c:341:10:  [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 = getenv("TERM");
data/openrc-0.42/src/libeinfo/libeinfo.c:419: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.
			if ((e = getenv("EINFO_COLOR"))) {
data/openrc-0.42/src/libeinfo/libeinfo.c:464: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.
	char *env = getenv("COLUMNS");
data/openrc-0.42/src/libeinfo/libeinfo.c:489: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.
	char *e = getenv("EINFO_LOG");
data/openrc-0.42/src/libeinfo/libeinfo.c:515: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.
	char *env = getenv("EINFO_INDENT");
data/openrc-0.42/src/libeinfo/libeinfo.c:577: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.
	char *last = getenv("EINFO_LASTCMD");
data/openrc-0.42/src/libeinfo/libeinfo.c:759:10:  [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 = getenv("TERM");
data/openrc-0.42/src/libeinfo/libeinfo.c:841: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.
	char *env = getenv("EINFO_INDENT");
data/openrc-0.42/src/libeinfo/libeinfo.c:861: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.
	char *env = getenv("EINFO_INDENT");
data/openrc-0.42/src/librc/librc-daemon.c:116: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 ((pp = getenv("RC_OPENRC_PID"))) {
data/openrc-0.42/src/librc/librc-depend.c:461: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.
	svcname = getenv("RC_SVCNAME");
data/openrc-0.42/src/librc/librc-depend.c:502: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.
	bootlevel = getenv("RC_BOOTLEVEL");
data/openrc-0.42/src/librc/librc-depend.c:526: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.
	bootlevel = getenv("RC_BOOTLEVEL");
data/openrc-0.42/src/librc/librc-depend.c:1521:7:  [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 (!getenv("RC_LIBEXECDIR"))
data/openrc-0.42/src/librc/librc.c:1029:7:  [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.
		if (realpath(dirname(init), path) == NULL) {
data/openrc-0.42/src/rc/checkpath.c:266: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, getoptstring,
data/openrc-0.42/src/rc/do_mark_service.c:37:18:  [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.
	char *svcname = getenv("RC_SVCNAME");
data/openrc-0.42/src/rc/do_mark_service.c:70: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.
		openrc_pid = getenv("RC_OPENRC_PID");
data/openrc-0.42/src/rc/do_service.c:46: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.
		service = getenv("RC_SVCNAME");
data/openrc-0.42/src/rc/do_service.c:56: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.
		service = getenv("RC_SVCNAME");
data/openrc-0.42/src/rc/do_value.c:39:18:  [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.
	char *service = getenv("RC_SVCNAME");
data/openrc-0.42/src/rc/fstabinfo.c:188: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, getoptstring,
data/openrc-0.42/src/rc/fstabinfo.c:305: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.
		if (rc_yesno(getenv("EINFO_QUIET")))
data/openrc-0.42/src/rc/kill_all.c:220: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, getoptstring,
data/openrc-0.42/src/rc/mountinfo.c:398: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, getoptstring,
data/openrc-0.42/src/rc/mountinfo.c:451:15:  [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.
		real_path = realpath(this_path, NULL);
data/openrc-0.42/src/rc/mountinfo.c:478:18:  [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 (! rc_yesno(getenv("EINFO_QUIET")))
data/openrc-0.42/src/rc/openrc-init.c:170: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.
		shell = getenv("SHELL");
data/openrc-0.42/src/rc/openrc-init.c:236:6:  [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 (getenv("SELINUX_INIT") == NULL) {
data/openrc-0.42/src/rc/openrc-run.c:609: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.
		if (rc_yesno(getenv("IN_HOTPLUG")))
data/openrc-0.42/src/rc/openrc-run.c:1148:9:  [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.
	path = realpath(argv[1], NULL);
data/openrc-0.42/src/rc/openrc-run.c:1189:26:  [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 ((runlevel = xstrdup(getenv("RC_RUNLEVEL"))) == NULL) {
data/openrc-0.42/src/rc/openrc-run.c:1242: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, getoptstring,
data/openrc-0.42/src/rc/openrc-run.c:1270: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 (rc_yesno(getenv("RC_NODEPS")))
data/openrc-0.42/src/rc/openrc-run.c:1275: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 (deps && getenv("RC_PID") == NULL &&
data/openrc-0.42/src/rc/openrc-run.c:1281:6:  [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 (getenv("IN_BACKGROUND")) {
data/openrc-0.42/src/rc/openrc-run.c:1282:20:  [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.
		ibsave = xstrdup(getenv("IN_BACKGROUND"));
data/openrc-0.42/src/rc/openrc-run.c:1287: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 (rc_yesno(getenv("IN_DRYRUN")))
data/openrc-0.42/src/rc/openrc-run.c:1289: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 (rc_yesno(getenv("IN_HOTPLUG"))) {
data/openrc-0.42/src/rc/openrc-shutdown.c:197: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, getoptstring,
data/openrc-0.42/src/rc/rc-abort.c:32:18:  [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("RC_PID");
data/openrc-0.42/src/rc/rc-depend.c:75:27:  [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.
	char *runlevel = xstrdup(getenv("RC_RUNLEVEL"));
data/openrc-0.42/src/rc/rc-depend.c:82: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, getoptstring,
data/openrc-0.42/src/rc/rc-misc.c:111:8:  [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 (!getenv(env->value))
data/openrc-0.42/src/rc/rc-misc.c:140: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.
	path = getenv("PATH");
data/openrc-0.42/src/rc/rc-schedules.c:334: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.
		if (rc_yesno(getenv("EINFO_VERBOSE"))) {
data/openrc-0.42/src/rc/rc-service.c:87: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, getoptstring,
data/openrc-0.42/src/rc/rc-status.c:276: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, getoptstring, longopts,
data/openrc-0.42/src/rc/rc-update.c:225: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, getoptstring,
data/openrc-0.42/src/rc/rc-update.c:242:21:  [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.
	verbose = rc_yesno(getenv ("EINFO_VERBOSE"));
data/openrc-0.42/src/rc/rc.c:204: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 (rc_yesno(getenv("EINFO_QUIET")))
data/openrc-0.42/src/rc/rc.c:291: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.
		shell = getenv("SHELL");
data/openrc-0.42/src/rc/rc.c:309:20:  [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.
	    strcmp(level, getenv ("RC_BOOTLEVEL")) == 0 ||
data/openrc-0.42/src/rc/rc.c:487: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.
	if (!rc_yesno(getenv ("EINFO_QUIET")) &&
data/openrc-0.42/src/rc/rc.c:635: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.
	if (!rc_yesno(getenv("EINFO_QUIET")))
data/openrc-0.42/src/rc/rc.c:692:20:  [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.
		strcmp(runlevel, getenv("RC_BOOTLEVEL")) == 0))
data/openrc-0.42/src/rc/rc.c:782: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, getoptstring,
data/openrc-0.42/src/rc/rc.c:847: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.
	bootlevel = getenv("RC_BOOTLEVEL");
data/openrc-0.42/src/rc/rc.c:885:21:  [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.
			strcmp(newlevel, getenv("RC_BOOTLEVEL")) != 0))
data/openrc-0.42/src/rc/start-stop-daemon.c:292:18:  [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.
	char *svcname = getenv("RC_SVCNAME");
data/openrc-0.42/src/rc/start-stop-daemon.c:315: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.
	if ((tmp = getenv("SSD_NICELEVEL")))
data/openrc-0.42/src/rc/start-stop-daemon.c:319: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.
	if ((tmp = getenv("SSD_IONICELEVEL"))) {
data/openrc-0.42/src/rc/start-stop-daemon.c:332:6:  [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("USER");
data/openrc-0.42/src/rc/start-stop-daemon.c:333: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.
	home = getenv("HOME");
data/openrc-0.42/src/rc/start-stop-daemon.c:346: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, getoptstring, longopts,
data/openrc-0.42/src/rc/start-stop-daemon.c:614: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.
			p = tmp = xstrdup(getenv("PATH"));
data/openrc-0.42/src/rc/start-stop-daemon.c:732: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.
		if (rc_yesno(getenv("EINFO_QUIET")))
data/openrc-0.42/src/rc/start-stop-daemon.c:792:18:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
		if (ch_root && chroot(ch_root) < 0)
data/openrc-0.42/src/rc/start-stop-daemon.c:880: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.
		if ((token = getenv("PATH"))) {
data/openrc-0.42/src/rc/start-stop-daemon.c:941:17:  [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.
				|| rc_yesno(getenv("EINFO_QUIET")))
data/openrc-0.42/src/rc/start-stop-daemon.c:944:17:  [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.
				|| rc_yesno(getenv("EINFO_QUIET")))
data/openrc-0.42/src/rc/start-stop-daemon.c:985: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.
	    ((p = getenv("SSD_STARTWAIT")) ||
data/openrc-0.42/src/rc/supervise-daemon.c:363:17:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
	if (ch_root && chroot(ch_root) < 0)
data/openrc-0.42/src/rc/supervise-daemon.c:436: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 ((token = getenv("PATH"))) {
data/openrc-0.42/src/rc/supervise-daemon.c:483:34:  [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 (redirect_stdout || rc_yesno(getenv("EINFO_QUIET")))
data/openrc-0.42/src/rc/supervise-daemon.c:485:34:  [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 (redirect_stderr || rc_yesno(getenv("EINFO_QUIET")))
data/openrc-0.42/src/rc/supervise-daemon.c:718: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.
	svcname = getenv("RC_SVCNAME");
data/openrc-0.42/src/rc/supervise-daemon.c:727: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.
	if ((tmp = getenv("SSD_NICELEVEL")))
data/openrc-0.42/src/rc/supervise-daemon.c:733:6:  [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("USER");
data/openrc-0.42/src/rc/supervise-daemon.c:734: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.
	home = getenv("HOME");
data/openrc-0.42/src/rc/supervise-daemon.c:752: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, getoptstring, longopts,
data/openrc-0.42/src/rc/supervise-daemon.c:970:23:  [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 = tmp = xstrdup(getenv("PATH"));
data/openrc-0.42/src/rc/swclock.c:62: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, getoptstring,
data/openrc-0.42/src/libeinfo/libeinfo.c:81: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 ebuffer[100];
data/openrc-0.42/src/libeinfo/libeinfo.c:97: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 *ecolors_str[ARRAY_SIZE(ecolors)];
data/openrc-0.42/src/libeinfo/libeinfo.c:109: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 termcapbuf[2048];
data/openrc-0.42/src/libeinfo/libeinfo.c:110: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 tcapbuf[512];
data/openrc-0.42/src/libeinfo/libeinfo.c:252: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[20];
data/openrc-0.42/src/libeinfo/libeinfo.c:253: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 *p, *e, c, dbuf[6];
data/openrc-0.42/src/libeinfo/libeinfo.c:322: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 tmp[100];
data/openrc-0.42/src/libeinfo/libeinfo.c:430: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).
						c = atoi(d);
data/openrc-0.42/src/libeinfo/libeinfo.c:517: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 indent[INDENT_MAX];
data/openrc-0.42/src/librc/librc-daemon.c:33: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(buffer, "r"))) {
data/openrc-0.42/src/librc/librc-daemon.c:53: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[PATH_MAX];
data/openrc-0.42/src/librc/librc-daemon.c:58: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(cmdline, O_RDONLY)) < 0) {
data/openrc-0.42/src/librc/librc-daemon.c:91: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 my_ns[30];
data/openrc-0.42/src/librc/librc-daemon.c:92: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 proc_ns[30];
data/openrc-0.42/src/librc/librc-daemon.c:128:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen("/proc/self/status", "r");
data/openrc-0.42/src/librc/librc-daemon.c:182:10:  [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(buffer, "r");
data/openrc-0.42/src/librc/librc-daemon.c:246: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 errbuf[_POSIX2_LINE_MAX];
data/openrc-0.42/src/librc/librc-daemon.c:330: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(ffile, "r");
data/openrc-0.42/src/librc/librc-daemon.c:388: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 oldfile[PATH_MAX] = { '\0' };
data/openrc-0.42/src/librc/librc-daemon.c:433: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 ((fp = fopen(file, "w"))) {
data/openrc-0.42/src/librc/librc-daemon.c:499: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 dirpath[PATH_MAX];
data/openrc-0.42/src/librc/librc-daemon.c:535:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(dirpath, "r");
data/openrc-0.42/src/librc/librc-daemon.c:579: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 ((fp = fopen(pidfile, "r"))) {
data/openrc-0.42/src/librc/librc-depend.c:157: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(deptree_file, "r")))
data/openrc-0.42/src/librc/librc-depend.c:586: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 path[PATH_MAX];
data/openrc-0.42/src/librc/librc-depend.c:1018: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(unap_line, unap_matrix[UNAPM_MIXED_EXPANDED][service_id], unap_line_size * sizeof(*unap_line));
data/openrc-0.42/src/librc/librc-depend.c:1081: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.
								memcpy(chains[chain_count_new], chains[chain_num], (chain_len+1)*sizeof(**chains));
data/openrc-0.42/src/librc/librc-depend.c:1219:7:  [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(ptr_dst, "> ", 2);
data/openrc-0.42/src/librc/librc-depend.c:1467: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(unap_matrix[UNAPM_MIXED_EXPANDED][service_id], unap_matrix[UNAPM_MIXED][service_id], (useneedafter_count+1) * sizeof(**unap_matrix));
data/openrc-0.42/src/librc/librc-depend.c:1888: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(RC_DEPTREE_CACHE, "w"))) {
data/openrc-0.42/src/librc/librc-depend.c:1913: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(RC_DEPCONFIG, "w"))) {
data/openrc-0.42/src/librc/librc-misc.c:63: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(file, "re");
data/openrc-0.42/src/librc/librc-misc.c:129: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("/proc/cmdline", "r")))
data/openrc-0.42/src/librc/librc-misc.c:174: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(file, "r")))
data/openrc-0.42/src/librc/librc-misc.c:326: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 path[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:67: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 file[PATH_MAX];
data/openrc-0.42/src/librc/librc.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 file[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:159: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(file, "r")))
data/openrc-0.42/src/librc/librc.c:366: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 path[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:440: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(RC_RUNLEVEL, "r"))) {
data/openrc-0.42/src/librc/librc.c:462: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(RC_RUNLEVEL, "w");
data/openrc-0.42/src/librc/librc.c:474: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 path[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:488: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 d[PATH_MAX], s[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:500: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 path[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:522: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[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:523: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 file[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:672: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 file[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:682: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 file[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:689: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 was[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:803: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 file[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:845: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 file[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:859: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 file[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:868: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 (!(fp = fopen(file, "w")))
data/openrc-0.42/src/librc/librc.c:882: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 file[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:907: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[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:919: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[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:976: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[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:1007: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 file[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:1008: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 path[MAXPATHLEN] = { '\0' };
data/openrc-0.42/src/librc/librc.c:1009: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 binit[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:1050: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 file[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:1065: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 file[PATH_MAX];
data/openrc-0.42/src/librc/librc.c:1080: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[PATH_MAX];
data/openrc-0.42/src/lsb2rcconf/main.c:166: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 			*relation_name[MAX_ ## relation_name + 1] = {NULL};\
data/openrc-0.42/src/lsb2rcconf/main.c:297: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 buf[BUFSIZ];
data/openrc-0.42/src/lsb2rcconf/main.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  start[BUFSIZ];
data/openrc-0.42/src/lsb2rcconf/main.c:335: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(buf->ptr, services, len);
data/openrc-0.42/src/lsb2rcconf/main.c:357:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char buf[PATH_MAX+1];
data/openrc-0.42/src/lsb2rcconf/main.c:374:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *file_insserv = fopen(file, "r");
data/openrc-0.42/src/lsb2rcconf/main.c:519:27:  [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 *file_initdscript = fopen(initdscript, "r");
data/openrc-0.42/src/rc/_usage.c:68: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 val[4] = "-?,";
data/openrc-0.42/src/rc/broadcast.c:60: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		uidbuf[32];
data/openrc-0.42/src/rc/broadcast.c:69: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(uidbuf, "uid %d", (int) uid);
data/openrc-0.42/src/rc/broadcast.c:71: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(uidbuf, "root");
data/openrc-0.42/src/rc/broadcast.c:186:35:  [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 (file_isatty(term) && (fd = open(term, flags)) >= 0) {
data/openrc-0.42/src/rc/checkpath.c:96: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).
	readfd = open(path, readflags);
data/openrc-0.42/src/rc/checkpath.c:103: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).
			fd = open(path, flags, mode);
data/openrc-0.42/src/rc/checkpath.c:125:13:  [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).
			readfd = open(path, readflags);
data/openrc-0.42/src/rc/checkpath.c:143:13:  [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).
			readfd = open(path, readflags);
data/openrc-0.42/src/rc/do_e.c:43:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		return atoi(name);
data/openrc-0.42/src/rc/do_e.c:158: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(p, argv[i], l);
data/openrc-0.42/src/rc/fstabinfo.c:111: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 *argv[10];
data/openrc-0.42/src/rc/fstabinfo.c:138:16:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
	switch (pid = vfork()) {
data/openrc-0.42/src/rc/kill_all.c:103:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(path, "r");
data/openrc-0.42/src/rc/kill_all.c:173:17:  [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).
		pid = (pid_t) atoi(d->d_name);
data/openrc-0.42/src/rc/kill_all.c:230: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).
					if ((pid_t) atoi(token) > 0)
data/openrc-0.42/src/rc/kill_all.c:244:8:  [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).
	sig = atoi(arg);
data/openrc-0.42/src/rc/mountinfo.c:323: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(procmounts, "r")) == NULL)
data/openrc-0.42/src/rc/mountinfo.c:363: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];
data/openrc-0.42/src/rc/openrc-init.c:222: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[2048];
data/openrc-0.42/src/rc/openrc-init.c:292:10:  [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).
		fifo = fopen(RC_INIT_FIFO, "r");
data/openrc-0.42/src/rc/openrc-run.c:294: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).
	lock_fd = open(PREFIX_LOCK, O_WRONLY | O_CREAT, 0664);
data/openrc-0.42/src/rc/openrc-run.c:513: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(file, O_RDONLY | O_NONBLOCK);
data/openrc-0.42/src/rc/openrc-run.c:1226: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(prefix, applet, ll);
data/openrc-0.42/src/rc/openrc-run.c:1249:19:  [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).
			exclusive_fd = atoi(optarg);
data/openrc-0.42/src/rc/openrc-shutdown.c:122: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(nologin_file, "w")) != NULL) {
data/openrc-0.42/src/rc/openrc-shutdown.c:142: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).
	fifo = fopen(RC_INIT_FIFO, "w");
data/openrc-0.42/src/rc/openrc-shutdown.c:291:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		shutdown_delay = atoi(time_arg);
data/openrc-0.42/src/rc/openrc-shutdown.c:294: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(shutdown_pid, "w");
data/openrc-0.42/src/rc/rc-logger.c:141: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[BUFSIZ];
data/openrc-0.42/src/rc/rc-logger.c:187: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 ((log = fopen(TMPLOG, "ae")))
data/openrc-0.42/src/rc/rc-logger.c:226: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(logbuf + logbuf_len,
data/openrc-0.42/src/rc/rc-logger.c:237: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 ((log = fopen(TMPLOG, "ae"))) {
data/openrc-0.42/src/rc/rc-logger.c:257: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 ((plog = fopen(logfile, "ae"))) {
data/openrc-0.42/src/rc/rc-logger.c:258: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 ((log = fopen(TMPLOG, "re"))) {
data/openrc-0.42/src/rc/rc-misc.c:174: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(RC_KRUNLEVEL, "r"))) {
data/openrc-0.42/src/rc/rc-misc.c:241: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(file, O_WRONLY | O_CREAT | O_NONBLOCK, 0664);
data/openrc-0.42/src/rc/rc-misc.c:268: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 *file, sfd[32];
data/openrc-0.42/src/rc/rc-misc.c:373: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(RC_DEPTREE_CACHE, O_WRONLY);
data/openrc-0.42/src/rc/rc-misc.c:401:10:  [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(RC_DEPTREE_SKEWED, "w");
data/openrc-0.42/src/rc/rc-misc.c:484: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(pidfile, "r")) == NULL) {
data/openrc-0.42/src/rc/rc-schedules.c:178: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[20];
data/openrc-0.42/src/rc/rc-schedules.c:224: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, string, len);
data/openrc-0.42/src/rc/rc-selinux.c:268: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(filepath, "r");
data/openrc-0.42/src/rc/rc-sysvinit.c:36: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("/run/initctl", O_WRONLY|O_NONBLOCK|O_CLOEXEC|O_NOCTTY);
data/openrc-0.42/src/rc/rc-sysvinit.c:95: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(request.i.data, name, nl);
data/openrc-0.42/src/rc/rc-sysvinit.c:98: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(request.i.data + nl + 1, value, vl);
data/openrc-0.42/src/rc/rc-sysvinit.h: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	gen_id[8];		/* Beats me.. telnetd uses "fe" */
data/openrc-0.42/src/rc/rc-sysvinit.h: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	tty_id[16];		/* Tty name minus /dev/tty      */
data/openrc-0.42/src/rc/rc-sysvinit.h:43: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	host[64];	/* Hostname                     */
data/openrc-0.42/src/rc/rc-sysvinit.h:44: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	term_type[16];		/* Terminal type                */
data/openrc-0.42/src/rc/rc-sysvinit.h:47: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	exec_name[128];	        /* Program to execute           */
data/openrc-0.42/src/rc/rc-sysvinit.h:48: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	reserved[128];		/* For future expansion.        */
data/openrc-0.42/src/rc/rc-sysvinit.h:65: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			data[368];
data/openrc-0.42/src/rc/rc.c:219: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(INTERACTIVE, "w");
data/openrc-0.42/src/rc/rc.c:320: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(RC_KRUNLEVEL, "w"))) {
data/openrc-0.42/src/rc/rc.c:338: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(RC_KRUNLEVEL, "r"))) {
data/openrc-0.42/src/rc/rc.c:705: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 pid[10];
data/openrc-0.42/src/rc/rc.c:714:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(pid, "%i", crashed_pid);
data/openrc-0.42/src/rc/start-stop-daemon.c:643:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(exec_file, "r");
data/openrc-0.42/src/rc/start-stop-daemon.c:775: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).
		tty_fd = open("/dev/tty", O_RDWR);
data/openrc-0.42/src/rc/start-stop-daemon.c:778: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).
		devnull_fd = open("/dev/null", O_RDWR);
data/openrc-0.42/src/rc/start-stop-daemon.c:801: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).
			fp = fopen(pidfile, "w");
data/openrc-0.42/src/rc/start-stop-daemon.c:896: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(np, token, len);
data/openrc-0.42/src/rc/start-stop-daemon.c:910:21:  [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 ((stdout_fd = open(redirect_stdout,
data/openrc-0.42/src/rc/start-stop-daemon.c:924:21:  [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 ((stderr_fd = open(redirect_stderr,
data/openrc-0.42/src/rc/supervise-daemon.c:332: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 start_count_string[20];
data/openrc-0.42/src/rc/supervise-daemon.c:333: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 start_time_string[20];
data/openrc-0.42/src/rc/supervise-daemon.c:347:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(start_count_string, "%i", respawn_count);
data/openrc-0.42/src/rc/supervise-daemon.c:349:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(start_count_string, "%d", getpid());
data/openrc-0.42/src/rc/supervise-daemon.c:452:5:  [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(np, token, len);
data/openrc-0.42/src/rc/supervise-daemon.c:466:20:  [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 ((stdout_fd = open(redirect_stdout,
data/openrc-0.42/src/rc/supervise-daemon.c:474:20:  [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 ((stderr_fd = open(redirect_stderr,
data/openrc-0.42/src/rc/supervise-daemon.c:505: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[2048];
data/openrc-0.42/src/rc/supervise-daemon.c:506: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 cmd[2048];
data/openrc-0.42/src/rc/supervise-daemon.c:537: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(pidfile, "w");
data/openrc-0.42/src/rc/supervise-daemon.c:563:13:  [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).
		fifo_fd = open(fifopath, O_RDONLY);
data/openrc-0.42/src/rc/supervise-daemon.c:1020:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(pidfile, "w");
data/openrc-0.42/src/rc/supervise-daemon.c:1043: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).
		tty_fd = open("/dev/tty", O_RDWR);
data/openrc-0.42/src/rc/supervise-daemon.c:1045: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).
		devnull_fd = open("/dev/null", O_RDWR);
data/openrc-0.42/src/rc/supervise-daemon.c:1102:13:  [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).
		fifo_fd = open(fifopath, O_WRONLY |O_NONBLOCK);
data/openrc-0.42/src/rc/swclock.c:81:10:  [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).
			opt = open(file, O_WRONLY | O_CREAT, 0644);
data/openrc-0.42/src/libeinfo/libeinfo.c:172: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).
		return dst_n + strlen(src);
data/openrc-0.42/src/libeinfo/libeinfo.c:422: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).
					ee += strlen(ecolors[i].name);
data/openrc-0.42/src/libeinfo/libeinfo.c:583: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).
	    last[strlen(last) - 1] == 'n')
data/openrc-0.42/src/libeinfo/libeinfo.c:754: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).
	cols = get_term_columns(fp) - (strlen(msg) + 5);
data/openrc-0.42/src/librc/librc-daemon.c:34:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c = getc(fp)) != EOF && c != '(')
data/openrc-0.42/src/librc/librc-daemon.c:37:16:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			while ((c = getc(fp)) != EOF && c == *exec)
data/openrc-0.42/src/librc/librc-daemon.c:62:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bytes = read(fd, buffer, sizeof(buffer) - 1);
data/openrc-0.42/src/librc/librc-daemon.c:74:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		p += strlen(p) + 1;
data/openrc-0.42/src/librc/librc-daemon.c:163:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(my_ns) && strlen (proc_ns) && strcmp(my_ns, proc_ns))
data/openrc-0.42/src/librc/librc-daemon.c:163: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).
		if (strlen(my_ns) && strlen (proc_ns) && strcmp(my_ns, proc_ns))
data/openrc-0.42/src/librc/librc-daemon.c:569: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).
			spidfile = xmalloc(strlen(ch_root) + strlen(pidfile) + 1);
data/openrc-0.42/src/librc/librc-daemon.c:569:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			spidfile = xmalloc(strlen(ch_root) + strlen(pidfile) + 1);
data/openrc-0.42/src/librc/librc-depend.c:72: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).
	e = p + strlen(p) - 1;
data/openrc-0.42/src/librc/librc-depend.c:1616: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(sys);
data/openrc-0.42/src/librc/librc-misc.c:109: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).
		last += strlen(p);
data/openrc-0.42/src/librc/librc-misc.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(ent);
data/openrc-0.42/src/librc/librc-misc.c:185: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 (token && (strlen(token) > 1)) {
data/openrc-0.42/src/librc/librc-misc.c:189: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).
				if (token[strlen(token) - 1] == '\n')
data/openrc-0.42/src/librc/librc-misc.c:190: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).
					token[strlen(token) - 1] = 0;
data/openrc-0.42/src/librc/librc-misc.c:231:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		i = strlen(token) - 1;
data/openrc-0.42/src/librc/librc-misc.c:244:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		i = strlen(entry);
data/openrc-0.42/src/librc/librc-misc.c:282: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).
		varlen = strlen(override->value);
data/openrc-0.42/src/librc/librc-misc.c:379: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(entry);
data/openrc-0.42/src/librc/librc.c:178: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).
			str += strlen(str) + 1;
data/openrc-0.42/src/librc/librc.c:443: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).
			i = strlen(runlevel) - 1;
data/openrc-0.42/src/librc/librc.c:618: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).
	l = strlen(OPTSTR) + strlen(svc) + 1;
data/openrc-0.42/src/librc/librc.c:618: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).
	l = strlen(OPTSTR) + strlen(svc) + 1;
data/openrc-0.42/src/librc/librc.c:657: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).
	l = strlen(DESCSTR) + strlen(svc) + strlen(option) + 2;
data/openrc-0.42/src/librc/librc.c:657: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).
	l = strlen(DESCSTR) + strlen(svc) + strlen(option) + 2;
data/openrc-0.42/src/librc/librc.c:657: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).
	l = strlen(DESCSTR) + strlen(svc) + strlen(option) + 2;
data/openrc-0.42/src/lsb2rcconf/main.c:328: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(services);
data/openrc-0.42/src/rc/broadcast.c:75: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).
		const size_t plen = strlen(_PATH_DEV);
data/openrc-0.42/src/rc/broadcast.c:171:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strncmp(utmp->ut_line, _PATH_DEV, strlen(_PATH_DEV)) == 0)
data/openrc-0.42/src/rc/checkpath.c:102:8:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
			u = umask(0);
data/openrc-0.42/src/rc/checkpath.c:104:4:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
			umask(u);
data/openrc-0.42/src/rc/checkpath.c:116:8:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
			u = umask(0);
data/openrc-0.42/src/rc/checkpath.c:119:4:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
			umask(u);
data/openrc-0.42/src/rc/checkpath.c:135:8:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
			u = umask(0);
data/openrc-0.42/src/rc/checkpath.c:137:4:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
			umask(u);
data/openrc-0.42/src/rc/do_e.c:149: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).
			l += strlen(argv[i]) + 1;
data/openrc-0.42/src/rc/do_e.c:157: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).
			l = strlen(argv[i]);
data/openrc-0.42/src/rc/openrc-run.c:319: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).
			ret += write(fd, ec, strlen(ec));
data/openrc-0.42/src/rc/openrc-run.c:320: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).
			ret += write(fd, prefix, strlen(prefix));
data/openrc-0.42/src/rc/openrc-run.c:321: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).
			ret += write(fd, ec_normal, strlen(ec_normal));
data/openrc-0.42/src/rc/openrc-run.c:449:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				bytes = read(master_tty, buffer, BUFSIZ);
data/openrc-0.42/src/rc/openrc-run.c:767: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).
			len += strlen(svc->value) + 2;
data/openrc-0.42/src/rc/openrc-run.c:1168: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).
		ll = strlen(dir) + strlen(file) + 2;
data/openrc-0.42/src/rc/openrc-run.c:1168: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).
		ll = strlen(dir) + strlen(file) + 2;
data/openrc-0.42/src/rc/openrc-run.c:1214: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).
			ll = strlen(svc->value);
data/openrc-0.42/src/rc/openrc-run.c:1220: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).
		ll = strlen(applet);
data/openrc-0.42/src/rc/openrc-shutdown.c:148: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).
	ignored = fwrite(cmd, 1, strlen(cmd), fifo);
data/openrc-0.42/src/rc/openrc-shutdown.c:149: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 (ignored != strlen(cmd))
data/openrc-0.42/src/rc/openrc-shutdown.c:273:3:  [1] (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 character.
		strcpy(time_arg, "0");
data/openrc-0.42/src/rc/rc-logger.c:212:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				bytes = read(rc_logger_tty, buffer, BUFSIZ);
data/openrc-0.42/src/rc/rc-misc.c:123: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).
	size_t pplen = strlen(RC_PATH_PREFIX);
data/openrc-0.42/src/rc/rc-misc.c:144:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		l = strlen(path) + pplen + 3;
data/openrc-0.42/src/rc/rc-misc.c:176: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).
			l = strlen (buffer) - 1;
data/openrc-0.42/src/rc/rc-plugin.c:209:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((nr = read(pfd[0], buffer, BUFSIZ)) > 0) {
data/openrc-0.42/src/rc/rc-plugin.c:217: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).
						p += strlen(p) + 1;
data/openrc-0.42/src/rc/rc-schedules.c:218: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(string);
data/openrc-0.42/src/rc/rc-selinux.c:264:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t read;
data/openrc-0.42/src/rc/rc-selinux.c:313: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).
	if (value != NULL && strlen(value) > 0) {
data/openrc-0.42/src/rc/rc-selinux.c:374:34:  [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 (strncmp(run_init_t, curr_t, strlen(run_init_t)) != 0) {
data/openrc-0.42/src/rc/rc-sysvinit.c:86:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	nl = strlen(name);
data/openrc-0.42/src/rc/rc-sysvinit.c:88: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).
		vl = strlen(value);
data/openrc-0.42/src/rc/rc-update.c:184: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).
				l = strlen(runlevel->value);
data/openrc-0.42/src/rc/rc-wtmp.c:42:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(utmp.ut_name, user, sizeof(utmp.ut_name));
data/openrc-0.42/src/rc/rc-wtmp.c:43:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(utmp.ut_id  , id  , sizeof(utmp.ut_id  ));
data/openrc-0.42/src/rc/rc-wtmp.c:44:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(utmp.ut_line, line, sizeof(utmp.ut_line));
data/openrc-0.42/src/rc/rc-wtmp.c:48:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(utmp.ut_host, uname_buf.release, sizeof(utmp.ut_host));
data/openrc-0.42/src/rc/rc.c:191:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(fd, &c, 1) == -1)
data/openrc-0.42/src/rc/rc.c:344:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		i = strlen(buffer);
data/openrc-0.42/src/rc/start-stop-daemon.c:656: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).
				len = strlen(p) - 1;
data/openrc-0.42/src/rc/start-stop-daemon.c:772:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		umask(numask);
data/openrc-0.42/src/rc/start-stop-daemon.c:881: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(token);
data/openrc-0.42/src/rc/start-stop-daemon.c:893: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).
					len = strlen(token);
data/openrc-0.42/src/rc/supervise-daemon.c:260: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).
		len += (strlen(*c) + 1);
data/openrc-0.42/src/rc/supervise-daemon.c:265:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(cmdline, " ");
data/openrc-0.42/src/rc/supervise-daemon.c:437: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(token);
data/openrc-0.42/src/rc/supervise-daemon.c:449: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).
				len = strlen(token);
data/openrc-0.42/src/rc/supervise-daemon.c:566:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			count = read(fifo_fd, buf, sizeof(buf) - 1);
data/openrc-0.42/src/rc/supervise-daemon.c:918:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(numask);
data/openrc-0.42/src/rc/supervise-daemon.c:1106: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).
		x = write(fifo_fd, str, strlen(str));

ANALYSIS SUMMARY:

Hits = 395
Lines analyzed = 18631 in approximately 0.50 seconds (37072 lines/second)
Physical Source Lines of Code (SLOC) = 14498
Hits@level = [0] 259 [1]  83 [2] 152 [3]  87 [4]  68 [5]   5
Hits@level+ = [0+] 654 [1+] 395 [2+] 312 [3+] 160 [4+]  73 [5+]   5
Hits/KSLOC@level+ = [0+] 45.1097 [1+] 27.2451 [2+] 21.5202 [3+] 11.036 [4+] 5.03518 [5+] 0.344875
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.