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/spectrwm-3.4.1/freebsd/util.h
Examining data/spectrwm-3.4.1/lib/swm_hack.c
Examining data/spectrwm-3.4.1/linux/linux.c
Examining data/spectrwm-3.4.1/linux/pledge.h
Examining data/spectrwm-3.4.1/linux/tree.h
Examining data/spectrwm-3.4.1/linux/util.h
Examining data/spectrwm-3.4.1/netbsd/util.h
Examining data/spectrwm-3.4.1/osx/osx.c
Examining data/spectrwm-3.4.1/osx/osx.h
Examining data/spectrwm-3.4.1/osx/queue.h
Examining data/spectrwm-3.4.1/version.h
Examining data/spectrwm-3.4.1/spectrwm.c

FINAL RESULTS:

data/spectrwm-3.4.1/spectrwm.c:149:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(stderr, x);						\
data/spectrwm-3.4.1/spectrwm.c:153:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(stderr, "%ld %s: " fmt,					\
data/spectrwm-3.4.1/spectrwm.c:2309: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(ws->stacker, sizeof ws->stacker,
data/spectrwm-3.4.1/spectrwm.c:2313: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(ws->stacker, sizeof ws->stacker,
data/spectrwm-3.4.1/spectrwm.c:3614:4:  [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(bar_argv[0], bar_argv);
data/spectrwm-3.4.1/spectrwm.c:4294: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(start_argv[0], start_argv);
data/spectrwm-3.4.1/spectrwm.c:4580: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(args->argv[0], args->argv);
data/spectrwm-3.4.1/spectrwm.c:8908:7:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		if (system(which) != 0)
data/spectrwm-3.4.1/lib/swm_hack.c:189: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 ((env = getenv("_SWM_WS")) != NULL)
data/spectrwm-3.4.1/lib/swm_hack.c:191: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 ((env = getenv("_SWM_PID")) != NULL)
data/spectrwm-3.4.1/lib/swm_hack.c:193: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("_SWM_XTERM_FONTADJ") != NULL) {
data/spectrwm-3.4.1/lib/swm_hack.c:230: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 ((env = getenv("_SWM_WS")) != NULL)
data/spectrwm-3.4.1/lib/swm_hack.c:232: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 ((env = getenv("_SWM_PID")) != NULL)
data/spectrwm-3.4.1/lib/swm_hack.c:234: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("_SWM_XTERM_FONTADJ") != NULL) {
data/spectrwm-3.4.1/spectrwm.c:4529: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 ((ret = getenv("LD_PRELOAD"))) {
data/spectrwm-3.4.1/spectrwm.c:10265: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("SWM_STARTED") != NULL)
data/spectrwm-3.4.1/spectrwm.c:10488: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("SWM_STARTED"))
data/spectrwm-3.4.1/spectrwm.c:10563: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("SWM_STARTED"))
data/spectrwm-3.4.1/spectrwm.c:12193:6:  [3] (random) setstate:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	if (setstate) {
data/spectrwm-3.4.1/spectrwm.c:13324: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.
			ret = getenv("XDG_CONFIG_HOME");
data/spectrwm-3.4.1/spectrwm.c:13341: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.
			ret = getenv("XDG_CONFIG_DIRS");
data/spectrwm-3.4.1/spectrwm.c:13584:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "c:hv")) != -1) {
data/spectrwm-3.4.1/spectrwm.c:13688: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("SWM_STARTED") == NULL)
data/spectrwm-3.4.1/lib/swm_hack.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			prop[SWM_PROPLEN];
data/spectrwm-3.4.1/linux/linux.c:269:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char *
data/spectrwm-3.4.1/linux/linux.c:270:56:  [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.
fparseln(FILE *fp, size_t *size, size_t *lineno, const char str[3],
data/spectrwm-3.4.1/linux/linux.c:273:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const char dstr[3] = { '\\', '\\', '#' };
data/spectrwm-3.4.1/linux/linux.c:334:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(void) memcpy(buf + len, ptr, s);
data/spectrwm-3.4.1/linux/util.h:11:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char   *fparseln(FILE *, size_t *, size_t *, const char [3], int);
data/spectrwm-3.4.1/spectrwm.c:408:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char		 bar_ext[SWM_BAR_MAX];
data/spectrwm-3.4.1/spectrwm.c:409:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char		 bar_ext_buf[SWM_BAR_MAX];
data/spectrwm-3.4.1/spectrwm.c:410:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char		 bar_vertext[SWM_BAR_MAX];
data/spectrwm-3.4.1/spectrwm.c:449:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char		*bar_fontnames[SWM_BAR_MAX_FONTS];
data/spectrwm-3.4.1/spectrwm.c:593: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			stacker[10];	/* display stacker and layout */
data/spectrwm-3.4.1/spectrwm.c:890: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			fmtrep[SWM_BAR_MAX * 2];
data/spectrwm-3.4.1/spectrwm.c:891: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			fmtsplit[SWM_BAR_MAX * 2];
data/spectrwm-3.4.1/spectrwm.c:2253: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				cname[32] = "#";
data/spectrwm-3.4.1/spectrwm.c:2689: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			b[8];
data/spectrwm-3.4.1/spectrwm.c:2718: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[SWM_BAR_MAX], *mark;
data/spectrwm-3.4.1/spectrwm.c:2867: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[SWM_BAR_MAX];
data/spectrwm-3.4.1/spectrwm.c:3154:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			bsect[i].weight = atoi(src);
data/spectrwm-3.4.1/spectrwm.c:3444: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			fmtexp[SWM_BAR_MAX], fmtnew[SWM_BAR_MAX];
data/spectrwm-3.4.1/spectrwm.c:3445: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			fmtact[SWM_BAR_MAX * 2];
data/spectrwm-3.4.1/spectrwm.c:3496: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		b[SWM_BAR_MAX];
data/spectrwm-3.4.1/spectrwm.c:4567: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).
		if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) == -1) {
data/spectrwm-3.4.1/spectrwm.c:7032:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			s[11];
data/spectrwm-3.4.1/spectrwm.c:7212: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(p, screens[i].ws[j].name, len);
data/spectrwm-3.4.1/spectrwm.c:8378:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			name[SWM_FUNCNAME_LEN];
data/spectrwm-3.4.1/spectrwm.c:8888: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			which[PATH_MAX];
data/spectrwm-3.4.1/spectrwm.c:10012:24:  [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).
		bar_action_expand = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10015: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).
		bar_at_bottom = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10018:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		bar_border_width = atoi(value);
data/spectrwm-3.4.1/spectrwm.c:10023: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).
		bar_enabled = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10026: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).
		ws_id = atoi(selector) - 1;
data/spectrwm-3.4.1/spectrwm.c:10035:29:  [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).
			ws[ws_id].bar_enabled = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10103: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).
		border_width = atoi(value);
data/spectrwm-3.4.1/spectrwm.c:10108: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).
		boundary_width = atoi(value);
data/spectrwm-3.4.1/spectrwm.c:10113: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).
		clock_enabled = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10123: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).
		cycle_empty = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10126: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).
		cycle_visible = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10135:21:  [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).
		disable_border = (atoi(value) != 0) || disable_border_always;
data/spectrwm-3.4.1/spectrwm.c:10152:23:  [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).
		focus_close_wrap = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10178:21:  [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).
		iconic_enabled = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10181:23:  [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).
		maximize_hide_bar = atoi(value);
data/spectrwm-3.4.1/spectrwm.c:10184: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).
		region_padding = atoi(value);
data/spectrwm-3.4.1/spectrwm.c:10207: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).
		stack_enabled = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10210:16:  [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).
		term_width = atoi(value);
data/spectrwm-3.4.1/spectrwm.c:10215:14:  [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).
		tile_gap = atoi(value);
data/spectrwm-3.4.1/spectrwm.c:10218:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		urgent_collapse = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10221:21:  [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).
		urgent_enabled = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10224:21:  [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).
		verbose_layout = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10233: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).
		warp_focus = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10236: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).
		warp_pointer = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10239:27:  [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).
		window_class_enabled = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10242:30:  [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).
		window_instance_enabled = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10245:26:  [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).
		window_name_enabled = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10248:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		workspace_clamp = (atoi(value) != 0);
data/spectrwm-3.4.1/spectrwm.c:10251:21:  [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).
		workspace_limit = atoi(value);
data/spectrwm-3.4.1/spectrwm.c:10333:14:  [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).
	    (last = atoi(selector) - 1) < 0) {
data/spectrwm-3.4.1/spectrwm.c:10756:16:  [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 ((config = fopen(filename, "r")) == NULL) {
data/spectrwm-3.4.1/spectrwm.c:10934: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(prop,
data/spectrwm-3.4.1/spectrwm.c:12347: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(name, xcb_get_atom_name_name(r), len);
data/spectrwm-3.4.1/spectrwm.c:13309: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			conf[PATH_MAX];
data/spectrwm-3.4.1/lib/swm_hack.c:125:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    strlen((char *)prop));
data/spectrwm-3.4.1/linux/linux.c:108: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).
		return(dlen + strlen(s));
data/spectrwm-3.4.1/linux/linux.c:367: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(buf);
data/spectrwm-3.4.1/spectrwm.c:1403: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).
				xcb_open_font(conn, cf, strlen("cursor"),
data/spectrwm-3.4.1/spectrwm.c:1457: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).
	ppwd = strlen(user) == 0 ? getpwuid(getuid()) : getpwnam(user);
data/spectrwm-3.4.1/spectrwm.c:1594:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	c = xcb_intern_atom(conn, 0, strlen(str), str);
data/spectrwm-3.4.1/spectrwm.c:1650: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).
		    8, strlen("spectrwm"), "spectrwm");
data/spectrwm-3.4.1/spectrwm.c:2098: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(s);
data/spectrwm-3.4.1/spectrwm.c:2274:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    xcb_alloc_named_color(conn, s->colormap, strlen(colorname),
data/spectrwm-3.4.1/spectrwm.c:2280:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    strlen(cname), cname), NULL);
data/spectrwm-3.4.1/spectrwm.c:2353:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(s);
data/spectrwm-3.4.1/spectrwm.c:2405:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(s);
data/spectrwm-3.4.1/spectrwm.c:2709:5:  [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).
		s[strlen(s) - 1] = 0;
data/spectrwm-3.4.1/spectrwm.c:2966: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(tmp);
data/spectrwm-3.4.1/spectrwm.c:3262:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		TEXTEXTENTS(bar_fs, sect->fmtrep, strlen(sect->fmtrep), &ibox,
data/spectrwm-3.4.1/spectrwm.c:3504: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(b);
data/spectrwm-3.4.1/spectrwm.c:7069: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(s);
data/spectrwm-3.4.1/spectrwm.c:7200: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(screens[i].ws[j].name);
data/spectrwm-3.4.1/spectrwm.c:7211: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(screens[i].ws[j].name);
data/spectrwm-3.4.1/spectrwm.c:7260: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).
				j += strlen(names + j);
data/spectrwm-3.4.1/spectrwm.c:7434:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rbytes = read(select_resp_pipe[0], resp, MAX_RESP_LEN);
data/spectrwm-3.4.1/spectrwm.c:7446: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(resp);
data/spectrwm-3.4.1/spectrwm.c:8867:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (selector == NULL || strlen(selector) == 0) {
data/spectrwm-3.4.1/spectrwm.c:8903: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).
		for (i = strlen("which "); i < strlen(which); i++)
data/spectrwm-3.4.1/spectrwm.c:8903: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).
		for (i = strlen("which "); i < strlen(which); i++)
data/spectrwm-3.4.1/spectrwm.c:8910: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).
			    &which[strlen("which ")]);
data/spectrwm-3.4.1/spectrwm.c:8957: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).
	if (bindstr == NULL || strlen(bindstr) == 0) {
data/spectrwm-3.4.1/spectrwm.c:9142:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (selector == NULL || strlen(selector) == 0) {
data/spectrwm-3.4.1/spectrwm.c:9873:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (selector == NULL || strlen(selector) == 0)
data/spectrwm-3.4.1/spectrwm.c:9895: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).
		instance = class + strlen(class) + 1;
data/spectrwm-3.4.1/spectrwm.c:9902:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		name = instance + strlen(instance) + 1;
data/spectrwm-3.4.1/spectrwm.c:10307: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).
	if (strncasecmp(value, "Mod1", strlen("Mod1")) == 0)
data/spectrwm-3.4.1/spectrwm.c:10309: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).
	else if (strncasecmp(value, "Mod2", strlen("Mod2")) == 0)
data/spectrwm-3.4.1/spectrwm.c:10311: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).
	else if (strncasecmp(value, "Mod3", strlen("Mod3")) == 0)
data/spectrwm-3.4.1/spectrwm.c:10313: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).
	else if (strncasecmp(value, "Mod4", strlen("Mod4")) == 0)
data/spectrwm-3.4.1/spectrwm.c:10315: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).
	else if (strncasecmp(value, "Mod5", strlen("Mod5")) == 0)
data/spectrwm-3.4.1/spectrwm.c:10332:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (selector == NULL || strlen(selector) == 0 ||
data/spectrwm-3.4.1/spectrwm.c:10789:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    (int)strlen(opt->name) == wordlen) {
data/spectrwm-3.4.1/spectrwm.c:10836: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(optval) == 0) {
data/spectrwm-3.4.1/spectrwm.c:10842: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).
		ce = optval + strlen(optval) - 1;

ANALYSIS SUMMARY:

Hits = 123
Lines analyzed = 16126 in approximately 0.39 seconds (41033 lines/second)
Physical Source Lines of Code (SLOC) = 12899
Hits@level = [0]  43 [1]  40 [2]  60 [3]  15 [4]   8 [5]   0
Hits@level+ = [0+] 166 [1+] 123 [2+]  83 [3+]  23 [4+]   8 [5+]   0
Hits/KSLOC@level+ = [0+] 12.8692 [1+] 9.53562 [2+] 6.43461 [3+] 1.78308 [4+] 0.620203 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.