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/bspwm-0.9.10/src/bspc.c
Examining data/bspwm-0.9.10/src/bspwm.c
Examining data/bspwm-0.9.10/src/bspwm.h
Examining data/bspwm-0.9.10/src/common.h
Examining data/bspwm-0.9.10/src/desktop.c
Examining data/bspwm-0.9.10/src/desktop.h
Examining data/bspwm-0.9.10/src/events.c
Examining data/bspwm-0.9.10/src/events.h
Examining data/bspwm-0.9.10/src/ewmh.c
Examining data/bspwm-0.9.10/src/ewmh.h
Examining data/bspwm-0.9.10/src/geometry.c
Examining data/bspwm-0.9.10/src/geometry.h
Examining data/bspwm-0.9.10/src/helpers.c
Examining data/bspwm-0.9.10/src/helpers.h
Examining data/bspwm-0.9.10/src/history.c
Examining data/bspwm-0.9.10/src/history.h
Examining data/bspwm-0.9.10/src/jsmn.c
Examining data/bspwm-0.9.10/src/jsmn.h
Examining data/bspwm-0.9.10/src/messages.c
Examining data/bspwm-0.9.10/src/messages.h
Examining data/bspwm-0.9.10/src/monitor.c
Examining data/bspwm-0.9.10/src/monitor.h
Examining data/bspwm-0.9.10/src/parse.c
Examining data/bspwm-0.9.10/src/parse.h
Examining data/bspwm-0.9.10/src/pointer.c
Examining data/bspwm-0.9.10/src/pointer.h
Examining data/bspwm-0.9.10/src/query.c
Examining data/bspwm-0.9.10/src/query.h
Examining data/bspwm-0.9.10/src/restore.c
Examining data/bspwm-0.9.10/src/restore.h
Examining data/bspwm-0.9.10/src/rule.c
Examining data/bspwm-0.9.10/src/rule.h
Examining data/bspwm-0.9.10/src/settings.c
Examining data/bspwm-0.9.10/src/settings.h
Examining data/bspwm-0.9.10/src/stack.c
Examining data/bspwm-0.9.10/src/stack.h
Examining data/bspwm-0.9.10/src/subscribe.c
Examining data/bspwm-0.9.10/src/subscribe.h
Examining data/bspwm-0.9.10/src/tree.c
Examining data/bspwm-0.9.10/src/tree.h
Examining data/bspwm-0.9.10/src/types.h
Examining data/bspwm-0.9.10/src/window.c
Examining data/bspwm-0.9.10/src/window.h
Examining data/bspwm-0.9.10/tests/test_window.c

FINAL RESULTS:

data/bspwm-0.9.10/src/bspc.c:60: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(sock_address.sun_path, sizeof(sock_address.sun_path), SOCKET_PATH_TPL, host, dn, sn);
data/bspwm-0.9.10/src/bspwm.c:109:5:  [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(WM_NAME " [-h|-v|-c CONFIG_PATH]\n");
data/bspwm-0.9.10/src/bspwm.c:166:5:  [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(socket_path, sizeof(socket_path), SOCKET_PATH_TPL, host, dn, sn);
data/bspwm-0.9.10/src/bspwm.c:267: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(state_path, sizeof(state_path), STATE_PATH_TPL, host, dn, sn);
data/bspwm-0.9.10/src/bspwm.c:308:17:  [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.
		exit_status = execvp(*rargv, rargv);
data/bspwm-0.9.10/src/helpers.c:40:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, ap);
data/bspwm-0.9.10/src/helpers.c:49:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, ap);
data/bspwm-0.9.10/src/helpers.c:135:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fifo_path, "%s/%s", runtime_dir, template);
data/bspwm-0.9.10/src/helpers.c:167:13:  [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.
	int size = vsnprintf(NULL, 0, fmt, tmp);
data/bspwm-0.9.10/src/helpers.c:180:9:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
	size = vsprintf(*buf, fmt, args);
data/bspwm-0.9.10/src/messages.c:1599:7:  [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 the scanf format is influenceable by an
  attacker, it's exploitable.
		if (sscanf(value, "%" SCNi8, &mapping_events_count) != 1) {
data/bspwm-0.9.10/src/messages.c:1804: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(rsp, "%" PRIi8, mapping_events_count);
data/bspwm-0.9.10/src/messages.c:1872:2:  [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(rsp, FAILURE_MESSAGE);
data/bspwm-0.9.10/src/messages.c:1875:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(rsp, fmt, ap);
data/bspwm-0.9.10/src/rule.c:363: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(external_rules_command, external_rules_command, wid, csq->class_name, csq->instance_name, csq_buf, NULL);
data/bspwm-0.9.10/src/settings.c:84: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(config_path, config_path, arg1, (char *) NULL);
data/bspwm-0.9.10/src/subscribe.c:155:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
				vfprintf(sb->stream, fmt, args);
data/bspwm-0.9.10/src/bspc.c:53: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.
	sp = getenv(SOCKET_ENV_VAR);
data/bspwm-0.9.10/src/bspwm.c:106:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "hvc:s:o:")) != -1) {
data/bspwm-0.9.10/src/bspwm.c:134: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.
		char *config_home = getenv(CONFIG_HOME_ENV);
data/bspwm-0.9.10/src/bspwm.c:138:62:  [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.
			snprintf(config_path, sizeof(config_path), "%s/%s/%s/%s", getenv("HOME"), ".config", WM_NAME, CONFIG_NAME);
data/bspwm-0.9.10/src/bspwm.c:159: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 *sp = getenv(SOCKET_ENV_VAR);
data/bspwm-0.9.10/src/helpers.c:125: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.
	char *runtime_dir = getenv(RUNTIME_DIR_ENV);
data/bspwm-0.9.10/src/bspc.c:40:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char msg[BUFSIZ], rsp[BUFSIZ];
data/bspwm-0.9.10/src/bspwm.c:59: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 config_path[MAXLEN];
data/bspwm-0.9.10/src/bspwm.c:95: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 socket_path[MAXLEN];
data/bspwm-0.9.10/src/bspwm.c:96: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 state_path[MAXLEN] = {0};
data/bspwm-0.9.10/src/bspwm.c:101:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char msg[BUFSIZ] = {0};
data/bspwm-0.9.10/src/bspwm.c:270: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 *f = fopen(state_path, "w");
data/bspwm-0.9.10/src/bspwm.c:299: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 sock_fd_arg[SMALEN];
data/bspwm-0.9.10/src/bspwm.h:58:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char config_path[MAXLEN];
data/bspwm-0.9.10/src/ewmh.c:128:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char names[MAXLEN];
data/bspwm-0.9.10/src/helpers.c:60:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int fd = open(file_path, O_RDONLY);
data/bspwm-0.9.10/src/helpers.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 buf[BUFSIZ], *content = NULL;
data/bspwm-0.9.10/src/helpers.c:137:16:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	if ((tempfd = mkstemp(fifo_path)) == -1) {
data/bspwm-0.9.10/src/messages.c:1329:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		stream = fopen(fifo_path, "w");
data/bspwm-0.9.10/src/parse.c:333: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).
	int i = atoi(s);
data/bspwm-0.9.10/src/rule.c:329:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char effect[MAXLEN];
data/bspwm-0.9.10/src/rule.c:358: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 wid[SMALEN];
data/bspwm-0.9.10/src/rule.c:379: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 data[BUFSIZ];
data/bspwm-0.9.10/src/settings.c:31: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 external_rules_command[MAXLEN];
data/bspwm-0.9.10/src/settings.c:32: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 status_prefix[MAXLEN];
data/bspwm-0.9.10/src/settings.c:34: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 normal_border_color[MAXLEN];
data/bspwm-0.9.10/src/settings.c:35: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 active_border_color[MAXLEN];
data/bspwm-0.9.10/src/settings.c:36: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 focused_border_color[MAXLEN];
data/bspwm-0.9.10/src/settings.c:37:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char presel_feedback_color[MAXLEN];
data/bspwm-0.9.10/src/settings.c:82: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 arg1[2];
data/bspwm-0.9.10/src/settings.h:70:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char external_rules_command[MAXLEN];
data/bspwm-0.9.10/src/settings.h:71:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char status_prefix[MAXLEN];
data/bspwm-0.9.10/src/settings.h:73:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char normal_border_color[MAXLEN];
data/bspwm-0.9.10/src/settings.h:74:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char active_border_color[MAXLEN];
data/bspwm-0.9.10/src/settings.h:75:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char focused_border_color[MAXLEN];
data/bspwm-0.9.10/src/settings.h:76:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char presel_feedback_color[MAXLEN];
data/bspwm-0.9.10/src/subscribe.c:113:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				char flags[5];
data/bspwm-0.9.10/src/types.h:211: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 class_name[MAXLEN];
data/bspwm-0.9.10/src/types.h:212: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 instance_name[MAXLEN];
data/bspwm-0.9.10/src/types.h:213: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[MAXLEN];
data/bspwm-0.9.10/src/types.h:271: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[SMALEN];
data/bspwm-0.9.10/src/types.h:286: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[SMALEN];
data/bspwm-0.9.10/src/types.h:343: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 class_name[MAXLEN];
data/bspwm-0.9.10/src/types.h:344: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 instance_name[MAXLEN];
data/bspwm-0.9.10/src/types.h:345: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[MAXLEN];
data/bspwm-0.9.10/src/types.h:346:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char effect[MAXLEN];
data/bspwm-0.9.10/src/types.h:353: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 class_name[MAXLEN];
data/bspwm-0.9.10/src/types.h:354:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char instance_name[MAXLEN];
data/bspwm-0.9.10/src/types.h:355: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[MAXLEN];
data/bspwm-0.9.10/src/types.h:356: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 monitor_desc[MAXLEN];
data/bspwm-0.9.10/src/types.h:357: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 desktop_desc[MAXLEN];
data/bspwm-0.9.10/src/types.h:358: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 node_desc[MAXLEN];
data/bspwm-0.9.10/tests/test_window.c:49: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 id[11];
data/bspwm-0.9.10/src/ewmh.c:297: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).
	xcb_ewmh_set_wm_name(ewmh, win, strlen(WM_NAME), WM_NAME);
data/bspwm-0.9.10/src/helpers.c:79:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		nb = read(fd, buf, sizeof(buf));
data/bspwm-0.9.10/src/helpers.c:101:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(content + (*tlen - nb), buf, nb);
data/bspwm-0.9.10/src/helpers.c:117:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cpy, str, len);
data/bspwm-0.9.10/src/helpers.c:130: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).
	char *fifo_path = malloc(strlen(runtime_dir)+1+strlen(template)+1);
data/bspwm-0.9.10/src/helpers.c:130:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	char *fifo_path = malloc(strlen(runtime_dir)+1+strlen(template)+1);
data/bspwm-0.9.10/src/helpers.c:186: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 (color[0] != '#' || strlen(color) != 7) {
data/bspwm-0.9.10/src/messages.c:1006: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).
					char *desc = copy_string(*args, strlen(*args));
data/bspwm-0.9.10/src/messages.c:1028: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).
					char *desc = copy_string(*args, strlen(*args));
data/bspwm-0.9.10/src/messages.c:1051: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).
					char *desc = copy_string(*args, strlen(*args));
data/bspwm-0.9.10/src/messages.c:1160:57:  [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 (size_t j = 0; i < sizeof(rule->effect) && j < strlen(*args); i++, j++) {
data/bspwm-0.9.10/src/monitor.c:77:59:  [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_icccm_set_wm_name(dpy, m->root, XCB_ATOM_STRING, 8, strlen(m->name), m->name);
data/bspwm-0.9.10/src/monitor.c:121:58:  [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_icccm_set_wm_name(dpy, m->root, XCB_ATOM_STRING, 8, strlen(m->name), m->name);
data/bspwm-0.9.10/src/parse.c:295:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		char *x = copy_string(s, strlen(s));
data/bspwm-0.9.10/src/query.c:532: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).
	char *desc_copy = copy_string(desc, strlen(desc));
data/bspwm-0.9.10/src/query.c:686: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).
	char *desc_copy = copy_string(desc, strlen(desc));
data/bspwm-0.9.10/src/query.c:804: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).
	char *desc_copy = copy_string(desc, strlen(desc));
data/bspwm-0.9.10/src/restore.c:641: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).
	return (strlen(s) == n && strncmp(s, json + key->start, n) == 0);
data/bspwm-0.9.10/src/rule.c:381:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((nb = read(fd, data, sizeof(data))) > 0) {
data/bspwm-0.9.10/src/window.c:953:86:  [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_intern_atom_reply_t *reply = xcb_intern_atom_reply(dpy, xcb_intern_atom(dpy, 0, strlen(name), name), NULL);
data/bspwm-0.9.10/tests/test_window.c:13:86:  [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_intern_atom_reply_t *reply = xcb_intern_atom_reply(dpy, xcb_intern_atom(dpy, 0, strlen(name), name), NULL);
data/bspwm-0.9.10/tests/test_window.c:37:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	ck = xcb_open_font_checked(dpy, font, strlen(font_name), font_name);
data/bspwm-0.9.10/tests/test_window.c:54: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).
	ck = xcb_image_text_8_checked(dpy, strlen(id), win, gc, x, y, id);

ANALYSIS SUMMARY:

Hits = 93
Lines analyzed = 14376 in approximately 0.40 seconds (35592 lines/second)
Physical Source Lines of Code (SLOC) = 11966
Hits@level = [0] 267 [1]  23 [2]  47 [3]   6 [4]  17 [5]   0
Hits@level+ = [0+] 360 [1+]  93 [2+]  70 [3+]  23 [4+]  17 [5+]   0
Hits/KSLOC@level+ = [0+] 30.0852 [1+] 7.77202 [2+] 5.84991 [3+] 1.92211 [4+] 1.42069 [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.