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/sway-1.5/client/pool-buffer.c
Examining data/sway-1.5/common/background-image.c
Examining data/sway-1.5/common/cairo.c
Examining data/sway-1.5/common/ipc-client.c
Examining data/sway-1.5/common/list.c
Examining data/sway-1.5/common/log.c
Examining data/sway-1.5/common/loop.c
Examining data/sway-1.5/common/pango.c
Examining data/sway-1.5/common/stringop.c
Examining data/sway-1.5/common/util.c
Examining data/sway-1.5/include/background-image.h
Examining data/sway-1.5/include/cairo.h
Examining data/sway-1.5/include/ipc-client.h
Examining data/sway-1.5/include/ipc.h
Examining data/sway-1.5/include/list.h
Examining data/sway-1.5/include/log.h
Examining data/sway-1.5/include/loop.h
Examining data/sway-1.5/include/pango.h
Examining data/sway-1.5/include/pool-buffer.h
Examining data/sway-1.5/include/stringop.h
Examining data/sway-1.5/include/sway/commands.h
Examining data/sway-1.5/include/sway/config.h
Examining data/sway-1.5/include/sway/criteria.h
Examining data/sway-1.5/include/sway/decoration.h
Examining data/sway-1.5/include/sway/desktop.h
Examining data/sway-1.5/include/sway/desktop/idle_inhibit_v1.h
Examining data/sway-1.5/include/sway/desktop/transaction.h
Examining data/sway-1.5/include/sway/input/cursor.h
Examining data/sway-1.5/include/sway/input/input-manager.h
Examining data/sway-1.5/include/sway/input/keyboard.h
Examining data/sway-1.5/include/sway/input/libinput.h
Examining data/sway-1.5/include/sway/input/seat.h
Examining data/sway-1.5/include/sway/input/switch.h
Examining data/sway-1.5/include/sway/input/tablet.h
Examining data/sway-1.5/include/sway/input/text_input.h
Examining data/sway-1.5/include/sway/ipc-json.h
Examining data/sway-1.5/include/sway/ipc-server.h
Examining data/sway-1.5/include/sway/layers.h
Examining data/sway-1.5/include/sway/output.h
Examining data/sway-1.5/include/sway/server.h
Examining data/sway-1.5/include/sway/surface.h
Examining data/sway-1.5/include/sway/swaynag.h
Examining data/sway-1.5/include/sway/tree/arrange.h
Examining data/sway-1.5/include/sway/tree/container.h
Examining data/sway-1.5/include/sway/tree/node.h
Examining data/sway-1.5/include/sway/tree/root.h
Examining data/sway-1.5/include/sway/tree/view.h
Examining data/sway-1.5/include/sway/tree/workspace.h
Examining data/sway-1.5/include/sway/xdg_decoration.h
Examining data/sway-1.5/include/sway/xwayland.h
Examining data/sway-1.5/include/swaybar/bar.h
Examining data/sway-1.5/include/swaybar/config.h
Examining data/sway-1.5/include/swaybar/i3bar.h
Examining data/sway-1.5/include/swaybar/input.h
Examining data/sway-1.5/include/swaybar/ipc.h
Examining data/sway-1.5/include/swaybar/render.h
Examining data/sway-1.5/include/swaybar/status_line.h
Examining data/sway-1.5/include/swaybar/tray/host.h
Examining data/sway-1.5/include/swaybar/tray/icon.h
Examining data/sway-1.5/include/swaybar/tray/item.h
Examining data/sway-1.5/include/swaybar/tray/tray.h
Examining data/sway-1.5/include/swaybar/tray/watcher.h
Examining data/sway-1.5/include/swaynag/config.h
Examining data/sway-1.5/include/swaynag/render.h
Examining data/sway-1.5/include/swaynag/swaynag.h
Examining data/sway-1.5/include/swaynag/types.h
Examining data/sway-1.5/include/util.h
Examining data/sway-1.5/sway/commands.c
Examining data/sway-1.5/sway/commands/assign.c
Examining data/sway-1.5/sway/commands/bar.c
Examining data/sway-1.5/sway/commands/bar/bind.c
Examining data/sway-1.5/sway/commands/bar/binding_mode_indicator.c
Examining data/sway-1.5/sway/commands/bar/colors.c
Examining data/sway-1.5/sway/commands/bar/font.c
Examining data/sway-1.5/sway/commands/bar/gaps.c
Examining data/sway-1.5/sway/commands/bar/height.c
Examining data/sway-1.5/sway/commands/bar/hidden_state.c
Examining data/sway-1.5/sway/commands/bar/icon_theme.c
Examining data/sway-1.5/sway/commands/bar/id.c
Examining data/sway-1.5/sway/commands/bar/mode.c
Examining data/sway-1.5/sway/commands/bar/modifier.c
Examining data/sway-1.5/sway/commands/bar/output.c
Examining data/sway-1.5/sway/commands/bar/pango_markup.c
Examining data/sway-1.5/sway/commands/bar/position.c
Examining data/sway-1.5/sway/commands/bar/separator_symbol.c
Examining data/sway-1.5/sway/commands/bar/status_command.c
Examining data/sway-1.5/sway/commands/bar/status_edge_padding.c
Examining data/sway-1.5/sway/commands/bar/status_padding.c
Examining data/sway-1.5/sway/commands/bar/strip_workspace_name.c
Examining data/sway-1.5/sway/commands/bar/strip_workspace_numbers.c
Examining data/sway-1.5/sway/commands/bar/swaybar_command.c
Examining data/sway-1.5/sway/commands/bar/tray_bind.c
Examining data/sway-1.5/sway/commands/bar/tray_output.c
Examining data/sway-1.5/sway/commands/bar/tray_padding.c
Examining data/sway-1.5/sway/commands/bar/workspace_buttons.c
Examining data/sway-1.5/sway/commands/bar/wrap_scroll.c
Examining data/sway-1.5/sway/commands/bind.c
Examining data/sway-1.5/sway/commands/border.c
Examining data/sway-1.5/sway/commands/client.c
Examining data/sway-1.5/sway/commands/create_output.c
Examining data/sway-1.5/sway/commands/default_border.c
Examining data/sway-1.5/sway/commands/default_floating_border.c
Examining data/sway-1.5/sway/commands/default_orientation.c
Examining data/sway-1.5/sway/commands/exec.c
Examining data/sway-1.5/sway/commands/exec_always.c
Examining data/sway-1.5/sway/commands/exit.c
Examining data/sway-1.5/sway/commands/floating.c
Examining data/sway-1.5/sway/commands/floating_minmax_size.c
Examining data/sway-1.5/sway/commands/floating_modifier.c
Examining data/sway-1.5/sway/commands/focus.c
Examining data/sway-1.5/sway/commands/focus_follows_mouse.c
Examining data/sway-1.5/sway/commands/focus_on_window_activation.c
Examining data/sway-1.5/sway/commands/focus_wrapping.c
Examining data/sway-1.5/sway/commands/font.c
Examining data/sway-1.5/sway/commands/for_window.c
Examining data/sway-1.5/sway/commands/force_display_urgency_hint.c
Examining data/sway-1.5/sway/commands/force_focus_wrapping.c
Examining data/sway-1.5/sway/commands/fullscreen.c
Examining data/sway-1.5/sway/commands/gaps.c
Examining data/sway-1.5/sway/commands/hide_edge_borders.c
Examining data/sway-1.5/sway/commands/include.c
Examining data/sway-1.5/sway/commands/inhibit_idle.c
Examining data/sway-1.5/sway/commands/input.c
Examining data/sway-1.5/sway/commands/input/accel_profile.c
Examining data/sway-1.5/sway/commands/input/calibration_matrix.c
Examining data/sway-1.5/sway/commands/input/click_method.c
Examining data/sway-1.5/sway/commands/input/drag.c
Examining data/sway-1.5/sway/commands/input/drag_lock.c
Examining data/sway-1.5/sway/commands/input/dwt.c
Examining data/sway-1.5/sway/commands/input/events.c
Examining data/sway-1.5/sway/commands/input/left_handed.c
Examining data/sway-1.5/sway/commands/input/map_from_region.c
Examining data/sway-1.5/sway/commands/input/map_to_output.c
Examining data/sway-1.5/sway/commands/input/map_to_region.c
Examining data/sway-1.5/sway/commands/input/middle_emulation.c
Examining data/sway-1.5/sway/commands/input/natural_scroll.c
Examining data/sway-1.5/sway/commands/input/pointer_accel.c
Examining data/sway-1.5/sway/commands/input/repeat_delay.c
Examining data/sway-1.5/sway/commands/input/repeat_rate.c
Examining data/sway-1.5/sway/commands/input/scroll_button.c
Examining data/sway-1.5/sway/commands/input/scroll_factor.c
Examining data/sway-1.5/sway/commands/input/scroll_method.c
Examining data/sway-1.5/sway/commands/input/tap.c
Examining data/sway-1.5/sway/commands/input/tap_button_map.c
Examining data/sway-1.5/sway/commands/input/xkb_capslock.c
Examining data/sway-1.5/sway/commands/input/xkb_file.c
Examining data/sway-1.5/sway/commands/input/xkb_layout.c
Examining data/sway-1.5/sway/commands/input/xkb_model.c
Examining data/sway-1.5/sway/commands/input/xkb_numlock.c
Examining data/sway-1.5/sway/commands/input/xkb_options.c
Examining data/sway-1.5/sway/commands/input/xkb_rules.c
Examining data/sway-1.5/sway/commands/input/xkb_switch_layout.c
Examining data/sway-1.5/sway/commands/input/xkb_variant.c
Examining data/sway-1.5/sway/commands/kill.c
Examining data/sway-1.5/sway/commands/layout.c
Examining data/sway-1.5/sway/commands/mark.c
Examining data/sway-1.5/sway/commands/max_render_time.c
Examining data/sway-1.5/sway/commands/mode.c
Examining data/sway-1.5/sway/commands/mouse_warping.c
Examining data/sway-1.5/sway/commands/move.c
Examining data/sway-1.5/sway/commands/new_float.c
Examining data/sway-1.5/sway/commands/new_window.c
Examining data/sway-1.5/sway/commands/no_focus.c
Examining data/sway-1.5/sway/commands/nop.c
Examining data/sway-1.5/sway/commands/opacity.c
Examining data/sway-1.5/sway/commands/output.c
Examining data/sway-1.5/sway/commands/output/adaptive_sync.c
Examining data/sway-1.5/sway/commands/output/background.c
Examining data/sway-1.5/sway/commands/output/disable.c
Examining data/sway-1.5/sway/commands/output/dpms.c
Examining data/sway-1.5/sway/commands/output/enable.c
Examining data/sway-1.5/sway/commands/output/max_render_time.c
Examining data/sway-1.5/sway/commands/output/mode.c
Examining data/sway-1.5/sway/commands/output/position.c
Examining data/sway-1.5/sway/commands/output/scale.c
Examining data/sway-1.5/sway/commands/output/scale_filter.c
Examining data/sway-1.5/sway/commands/output/subpixel.c
Examining data/sway-1.5/sway/commands/output/toggle.c
Examining data/sway-1.5/sway/commands/output/transform.c
Examining data/sway-1.5/sway/commands/popup_during_fullscreen.c
Examining data/sway-1.5/sway/commands/reload.c
Examining data/sway-1.5/sway/commands/rename.c
Examining data/sway-1.5/sway/commands/resize.c
Examining data/sway-1.5/sway/commands/scratchpad.c
Examining data/sway-1.5/sway/commands/seat.c
Examining data/sway-1.5/sway/commands/seat/attach.c
Examining data/sway-1.5/sway/commands/seat/cursor.c
Examining data/sway-1.5/sway/commands/seat/fallback.c
Examining data/sway-1.5/sway/commands/seat/hide_cursor.c
Examining data/sway-1.5/sway/commands/seat/idle.c
Examining data/sway-1.5/sway/commands/seat/keyboard_grouping.c
Examining data/sway-1.5/sway/commands/seat/pointer_constraint.c
Examining data/sway-1.5/sway/commands/seat/shortcuts_inhibitor.c
Examining data/sway-1.5/sway/commands/seat/xcursor_theme.c
Examining data/sway-1.5/sway/commands/set.c
Examining data/sway-1.5/sway/commands/shortcuts_inhibitor.c
Examining data/sway-1.5/sway/commands/show_marks.c
Examining data/sway-1.5/sway/commands/smart_borders.c
Examining data/sway-1.5/sway/commands/smart_gaps.c
Examining data/sway-1.5/sway/commands/split.c
Examining data/sway-1.5/sway/commands/sticky.c
Examining data/sway-1.5/sway/commands/swap.c
Examining data/sway-1.5/sway/commands/swaybg_command.c
Examining data/sway-1.5/sway/commands/swaynag_command.c
Examining data/sway-1.5/sway/commands/tiling_drag.c
Examining data/sway-1.5/sway/commands/tiling_drag_threshold.c
Examining data/sway-1.5/sway/commands/title_align.c
Examining data/sway-1.5/sway/commands/title_format.c
Examining data/sway-1.5/sway/commands/titlebar_border_thickness.c
Examining data/sway-1.5/sway/commands/titlebar_padding.c
Examining data/sway-1.5/sway/commands/unmark.c
Examining data/sway-1.5/sway/commands/urgent.c
Examining data/sway-1.5/sway/commands/workspace.c
Examining data/sway-1.5/sway/commands/workspace_layout.c
Examining data/sway-1.5/sway/commands/ws_auto_back_and_forth.c
Examining data/sway-1.5/sway/commands/xwayland.c
Examining data/sway-1.5/sway/config.c
Examining data/sway-1.5/sway/config/bar.c
Examining data/sway-1.5/sway/config/input.c
Examining data/sway-1.5/sway/config/output.c
Examining data/sway-1.5/sway/config/seat.c
Examining data/sway-1.5/sway/criteria.c
Examining data/sway-1.5/sway/decoration.c
Examining data/sway-1.5/sway/desktop/desktop.c
Examining data/sway-1.5/sway/desktop/idle_inhibit_v1.c
Examining data/sway-1.5/sway/desktop/layer_shell.c
Examining data/sway-1.5/sway/desktop/output.c
Examining data/sway-1.5/sway/desktop/render.c
Examining data/sway-1.5/sway/desktop/surface.c
Examining data/sway-1.5/sway/desktop/transaction.c
Examining data/sway-1.5/sway/desktop/xdg_shell.c
Examining data/sway-1.5/sway/desktop/xwayland.c
Examining data/sway-1.5/sway/input/cursor.c
Examining data/sway-1.5/sway/input/input-manager.c
Examining data/sway-1.5/sway/input/keyboard.c
Examining data/sway-1.5/sway/input/libinput.c
Examining data/sway-1.5/sway/input/seat.c
Examining data/sway-1.5/sway/input/seatop_default.c
Examining data/sway-1.5/sway/input/seatop_down.c
Examining data/sway-1.5/sway/input/seatop_move_floating.c
Examining data/sway-1.5/sway/input/seatop_move_tiling.c
Examining data/sway-1.5/sway/input/seatop_resize_floating.c
Examining data/sway-1.5/sway/input/seatop_resize_tiling.c
Examining data/sway-1.5/sway/input/switch.c
Examining data/sway-1.5/sway/input/tablet.c
Examining data/sway-1.5/sway/input/text_input.c
Examining data/sway-1.5/sway/ipc-json.c
Examining data/sway-1.5/sway/ipc-server.c
Examining data/sway-1.5/sway/main.c
Examining data/sway-1.5/sway/server.c
Examining data/sway-1.5/sway/swaynag.c
Examining data/sway-1.5/sway/tree/arrange.c
Examining data/sway-1.5/sway/tree/container.c
Examining data/sway-1.5/sway/tree/node.c
Examining data/sway-1.5/sway/tree/output.c
Examining data/sway-1.5/sway/tree/root.c
Examining data/sway-1.5/sway/tree/view.c
Examining data/sway-1.5/sway/tree/workspace.c
Examining data/sway-1.5/sway/xdg_decoration.c
Examining data/sway-1.5/swaybar/bar.c
Examining data/sway-1.5/swaybar/config.c
Examining data/sway-1.5/swaybar/i3bar.c
Examining data/sway-1.5/swaybar/input.c
Examining data/sway-1.5/swaybar/ipc.c
Examining data/sway-1.5/swaybar/main.c
Examining data/sway-1.5/swaybar/render.c
Examining data/sway-1.5/swaybar/status_line.c
Examining data/sway-1.5/swaybar/tray/host.c
Examining data/sway-1.5/swaybar/tray/icon.c
Examining data/sway-1.5/swaybar/tray/item.c
Examining data/sway-1.5/swaybar/tray/tray.c
Examining data/sway-1.5/swaybar/tray/watcher.c
Examining data/sway-1.5/swaymsg/main.c
Examining data/sway-1.5/swaynag/config.c
Examining data/sway-1.5/swaynag/main.c
Examining data/sway-1.5/swaynag/render.c
Examining data/sway-1.5/swaynag/swaynag.c
Examining data/sway-1.5/swaynag/types.c

FINAL RESULTS:

data/sway-1.5/swaynag/swaynag.c:30:2:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	chmod(fname, S_IRUSR | S_IWUSR | S_IXUSR);
data/sway-1.5/common/ipc-client.c:23: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.
	FILE *fp = popen("sway --get-socketpath 2>/dev/null", "r");
data/sway-1.5/common/ipc-client.c:40:7:  [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.
	fp = popen("i3 --get-socketpath 2>/dev/null", "r");
data/sway-1.5/common/log.c:89: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, args);
data/sway-1.5/common/pango.c:90:15:  [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 length = vsnprintf(NULL, 0, fmt, args) + 1;
data/sway-1.5/common/pango.c:99:2:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	vsnprintf(buf, length, fmt, args);
data/sway-1.5/common/pango.c:117:15:  [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 length = vsnprintf(NULL, 0, fmt, args) + 1;
data/sway-1.5/common/pango.c:126:2:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	vsnprintf(buf, length, fmt, args);
data/sway-1.5/common/stringop.c:54:10:  [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).
		return strcat(dest, src);
data/sway-1.5/common/stringop.c:247:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(res + len, argv[i]);
data/sway-1.5/include/log.h:18:57:  [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.
#define ATTRIB_PRINTF(start, end) __attribute__((format(printf, start, end)))
data/sway-1.5/sway/commands.c:387:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(&temp[1], argv[1]);
data/sway-1.5/sway/commands.c:511:4:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			vsnprintf(error, 256, format, args);
data/sway-1.5/sway/commands/exec_always.c:64: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("/bin/sh", "/bin/sh", "-c", cmd, (void *)NULL);
data/sway-1.5/sway/commands/input/xkb_file.c:36:21:  [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.
		bool can_access = access(ic->xkb_file, F_OK) != -1;
data/sway-1.5/sway/commands/output/background.c:115:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(src, "%s/%s", conf_path, rel_path);
data/sway-1.5/sway/commands/output/background.c:120:21:  [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.
		bool can_access = access(src, F_OK) != -1;
data/sway-1.5/sway/config.c:338:17:  [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.
	return path && access(path, R_OK) != -1;
data/sway-1.5/sway/config.c:698:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(&(*lineptr)[nread - next_nread], next_line);
data/sway-1.5/sway/config.c:780: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(&this_config[read], line);
data/sway-1.5/sway/config.c:883:19:  [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.
		size_t length = vsnprintf(NULL, 0, fmt, args) + 1;
data/sway-1.5/sway/config.c:893:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		vsnprintf(temp, length, fmt, args);
data/sway-1.5/sway/config.c:941:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
				strcpy(newptr, find + vnlen);
data/sway-1.5/sway/config/bar.c:238: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(cmd[0], cmd);
data/sway-1.5/sway/config/output.c:716: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(command[0], command);
data/sway-1.5/sway/criteria.c:53: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(error, len, fmt, value, reg_err);
data/sway-1.5/sway/criteria.c:516: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(error, len, fmt, name);
data/sway-1.5/sway/criteria.c:525: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(error, len, fmt, name);
data/sway-1.5/sway/criteria.c:640:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(value, copy);
data/sway-1.5/sway/input/input-manager.c:80:12:  [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.
	int len = snprintf(NULL, 0, fmt, vendor, product, name) + 1;
data/sway-1.5/sway/input/input-manager.c:87: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(identifier, len, fmt, vendor, product, name);
data/sway-1.5/sway/input/keyboard.c:669:18:  [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.
	size_t length = vsnprintf(NULL, 0, format, args_copy) + 1;
data/sway-1.5/sway/input/keyboard.c:679:2:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	vsnprintf(error, length, format, args_copy);
data/sway-1.5/sway/ipc-server.c:101:36:  [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 (getenv("SWAYSOCK") != NULL && access(getenv("SWAYSOCK"), F_OK) == -1) {
data/sway-1.5/sway/main.c:177: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.
	FILE *f = popen("uname -a", "r");
data/sway-1.5/sway/swaynag.c:90: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("/bin/sh", "/bin/sh", "-c", cmd, NULL);
data/sway-1.5/sway/swaynag.c:146:18:  [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.
	size_t length = vsnprintf(NULL, 0, fmt, args) + 1;
data/sway-1.5/sway/swaynag.c:156:2:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	vsnprintf(temp, length, fmt, args);
data/sway-1.5/sway/tree/container.c:1503:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(part, "[%s]", mark);
data/sway-1.5/sway/tree/container.c:1504: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(buffer, part);
data/sway-1.5/swaybar/status_line.c:170: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(_cmd[0], _cmd);
data/sway-1.5/swaybar/tray/icon.c:426: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(path, R_OK) == 0) {
data/sway-1.5/swaymsg/main.c:134: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(fmt, json_object_get_string(name),
data/sway-1.5/swaymsg/main.c:166: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(fmt, json_object_get_string(name),
data/sway-1.5/swaymsg/main.c:242:3:  [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(max_render_time_int == 0 ? "off\n" : "%d ms\n", max_render_time_int);
data/sway-1.5/swaynag/config.c:308:17:  [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.
	return path && access(path, R_OK) != -1;
data/sway-1.5/swaynag/config.c:381:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(flag, "--%s", line);
data/sway-1.5/swaynag/swaynag.c:32:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(cmd, "%s -e %s", terminal, fname);
data/sway-1.5/swaynag/swaynag.c:33:2:  [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", "/bin/sh", "-c", cmd, NULL);
data/sway-1.5/swaynag/swaynag.c:72:6:  [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", "/bin/sh", "-c", button->action, NULL);
data/sway-1.5/client/pool-buffer.c:18: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.
	const char *path = getenv("XDG_RUNTIME_DIR");
data/sway-1.5/common/ipc-client.c:17:25:  [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 *swaysock = getenv("SWAYSOCK");
data/sway-1.5/common/ipc-client.c:35: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.
	const char *i3sock = getenv("I3SOCK");
data/sway-1.5/sway/config.c:351: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 *config_home = getenv("XDG_CONFIG_HOME");
data/sway-1.5/sway/config.c:411:20:  [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.
	char *real_path = realpath(path, NULL);
data/sway-1.5/sway/config.c:567:20:  [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.
	char *real_path = realpath(full_path, NULL);
data/sway-1.5/sway/ipc-server.c:101: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("SWAYSOCK") != NULL && access(getenv("SWAYSOCK"), F_OK) == -1) {
data/sway-1.5/sway/ipc-server.c:101:43:  [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("SWAYSOCK") != NULL && access(getenv("SWAYSOCK"), F_OK) == -1) {
data/sway-1.5/sway/ipc-server.c:102:35:  [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.
		strncpy(ipc_sockaddr->sun_path, getenv("SWAYSOCK"), sizeof(ipc_sockaddr->sun_path) - 1);
data/sway-1.5/sway/ipc-server.c:138: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.
	const char *dir = getenv("XDG_RUNTIME_DIR");
data/sway-1.5/sway/main.c:141:45:  [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.
		sway_log(SWAY_INFO, "%s=%s", log_vars[i], getenv(log_vars[i]));
data/sway-1.5/sway/main.c:258:7:  [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.
		c = getopt_long(argc, argv, "hCdD:vVc:", long_options, &option_index);
data/sway-1.5/sway/main.c:291: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("SWAYSOCK")) {
data/sway-1.5/sway/main.c:292:29:  [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.
				fprintf(stdout, "%s\n", getenv("SWAYSOCK"));
data/sway-1.5/sway/main.c:307: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("XDG_RUNTIME_DIR") && optind == argc) {
data/sway-1.5/sway/main.c:347: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 *socket_path = getenv("SWAYSOCK");
data/sway-1.5/swaybar/input.c:70:29:  [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 *cursor_theme = getenv("XCURSOR_THEME");
data/sway-1.5/swaybar/input.c:72:32:  [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 *env_cursor_size = getenv("XCURSOR_SIZE");
data/sway-1.5/swaybar/main.c:46:7:  [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.
		c = getopt_long(argc, argv, "hvs:b:d", long_options, &option_index);
data/sway-1.5/swaybar/status_line.c:157: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.
	assert(!getenv("WAYLAND_SOCKET") && "display must be initialized before "
data/sway-1.5/swaybar/tray/icon.c:30: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.
	char *data_home = getenv("XDG_DATA_HOME");
data/sway-1.5/swaybar/tray/icon.c:36: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.
	char *data_dirs = getenv("XDG_DATA_DIRS");
data/sway-1.5/swaymsg/main.c:375:7:  [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.
		c = getopt_long(argc, argv, "hmpqrs:t:v", long_options, &option_index);
data/sway-1.5/swaynag/config.c:130:11:  [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.
		int c = getopt_long(argc, argv, "b:B:z:Z:c:de:f:hlL:m:o:s:t:v", opts, NULL);
data/sway-1.5/swaynag/config.c:318: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 *config_home = getenv("XDG_CONFIG_HOME");
data/sway-1.5/swaynag/swaynag.c:60: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 *terminal = getenv("TERMINAL");
data/sway-1.5/swaynag/swaynag.c:138:29:  [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 *cursor_theme = getenv("XCURSOR_THEME");
data/sway-1.5/swaynag/swaynag.c:140:32:  [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 *env_cursor_size = getenv("XCURSOR_SIZE");
data/sway-1.5/client/pool-buffer.c:32:11:  [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).
	int fd = mkstemp(*name);
data/sway-1.5/common/ipc-client.c:81: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[IPC_HEADER_SIZE];
data/sway-1.5/common/ipc-client.c:99: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(&response->size, &data32[0], sizeof(data32[0]));
data/sway-1.5/common/ipc-client.c:100: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(&response->type, &data32[1], sizeof(data32[1]));
data/sway-1.5/common/ipc-client.c:131: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[IPC_HEADER_SIZE];
data/sway-1.5/common/ipc-client.c:133: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(data, ipc_magic, sizeof(ipc_magic));
data/sway-1.5/common/ipc-client.c:134: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(&data32[0], len, sizeof(*len));
data/sway-1.5/common/ipc-client.c:135: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(&data32[1], &type, sizeof(type));
data/sway-1.5/sway/commands/bar/colors.c:55: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 *rgba[3] = {0};
data/sway-1.5/sway/commands/bar/colors.c:77: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 **colors[3] = {
data/sway-1.5/sway/commands/bar/colors.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 **colors[3] = {
data/sway-1.5/sway/commands/bar/colors.c:105: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 **colors[3] = {
data/sway-1.5/sway/commands/bar/colors.c:114: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 **colors[3] = {
data/sway-1.5/sway/commands/bar/colors.c:143: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 **colors[3] = {
data/sway-1.5/sway/commands/bar/height.c:11:15:  [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 height = atoi(argv[0]);
data/sway-1.5/sway/commands/bind.c:610: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(deferred, binding, sizeof(struct sway_binding));
data/sway-1.5/sway/commands/border.c:91:33:  [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).
		container->border_thickness = atoi(argv[1]);
data/sway-1.5/sway/commands/client.c:45: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(class, &colors, sizeof(struct border_colors));
data/sway-1.5/sway/commands/default_border.c:23: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).
		config->border_thickness = atoi(argv[1]);
data/sway-1.5/sway/commands/default_floating_border.c:25:39:  [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).
		config->floating_border_thickness = atoi(argv[1]);
data/sway-1.5/sway/commands/exec_always.c:42:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cmd[4096];
data/sway-1.5/sway/commands/input/repeat_delay.c:17: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).
	int repeat_delay = atoi(argv[0]);
data/sway-1.5/sway/commands/input/repeat_rate.c:17: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).
	int repeat_rate = atoi(argv[0]);
data/sway-1.5/sway/commands/output.c:61: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 identifier[128];
data/sway-1.5/sway/commands/swap.c:235: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).
		size_t con_id = atoi(value);
data/sway-1.5/sway/config.c:220:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(config->current_mode->name, "default");
data/sway-1.5/sway/config.c:387: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).
	FILE *f = fopen(path, "r");
data/sway-1.5/sway/config/bar.c:229: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 wayland_socket_str[16];
data/sway-1.5/sway/config/input.c:134: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(dst->mapped_from_region, src->mapped_from_region,
data/sway-1.5/sway/config/input.c:148: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(dst->mapped_to_region, src->mapped_to_region,
data/sway-1.5/sway/config/input.c:153: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(dst->calibration_matrix.matrix, src->calibration_matrix.matrix,
data/sway-1.5/sway/config/output.c:140: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[128];
data/sway-1.5/sway/config/output.c:603: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[128];
data/sway-1.5/sway/config/output.c:613: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[128];
data/sway-1.5/sway/config/output.c:711: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 wayland_socket_str[16];
data/sway-1.5/sway/desktop/layer_shell.c:190: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(&output->usable_area, &usable_area, sizeof(struct wlr_box));
data/sway-1.5/sway/desktop/output.c:36: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 identifier[128];
data/sway-1.5/sway/desktop/output.c:49: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 identifier[128];
data/sway-1.5/sway/desktop/output.c:114: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(surface_box, &box, sizeof(struct wlr_box));
data/sway-1.5/sway/desktop/output.c:748: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(&box, _box, sizeof(struct wlr_box));
data/sway-1.5/sway/desktop/render.c:220:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&box, _box, sizeof(struct wlr_box));
data/sway-1.5/sway/desktop/render.c:359: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(&color, colors->child_border, sizeof(float) * 4);
data/sway-1.5/sway/desktop/render.c:375: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(&color, colors->indicator, sizeof(float) * 4);
data/sway-1.5/sway/desktop/render.c:377: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(&color, colors->child_border, sizeof(float) * 4);
data/sway-1.5/sway/desktop/render.c:390: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(&color, colors->indicator, sizeof(float) * 4);
data/sway-1.5/sway/desktop/render.c:392: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(&color, colors->child_border, sizeof(float) * 4);
data/sway-1.5/sway/desktop/render.c:429: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(&color, colors->border, sizeof(float) * 4);
data/sway-1.5/sway/desktop/render.c:512: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(&color, colors->background, sizeof(float) * 4);
data/sway-1.5/sway/desktop/render.c:580: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(&color, colors->background, sizeof(float) * 4);
data/sway-1.5/sway/desktop/render.c:671: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(&color, colors->child_border, sizeof(float) * 4);
data/sway-1.5/sway/desktop/transaction.c:195: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(&output->current, state, sizeof(struct sway_output_state));
data/sway-1.5/sway/desktop/transaction.c:204: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(&ws->current, state, sizeof(struct sway_workspace_state));
data/sway-1.5/sway/desktop/transaction.c:233: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(&container->current, state, sizeof(struct sway_container_state));
data/sway-1.5/sway/desktop/transaction.c:440: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(&node->sway_container->view->saved_geometry,
data/sway-1.5/sway/desktop/xdg_shell.c:293: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(&view->geometry, &new_geo, sizeof(struct wlr_box));
data/sway-1.5/sway/desktop/xdg_shell.c:299: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(&view->geometry, &new_geo, sizeof(struct wlr_box));
data/sway-1.5/sway/desktop/xwayland.c:21: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 *atom_map[ATOM_LAST] = {
data/sway-1.5/sway/desktop/xwayland.c:383: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(&view->geometry, &new_geo, sizeof(struct wlr_box));
data/sway-1.5/sway/desktop/xwayland.c:389: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(&view->geometry, &new_geo, sizeof(struct wlr_box));
data/sway-1.5/sway/input/keyboard.c:714: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 *keymap_file = fopen(ic->xkb_file, "r");
data/sway-1.5/sway/input/seat.c:920: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 cursor_size_fmt[16];
data/sway-1.5/sway/input/seatop_move_tiling.c:34: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(&color, config->border_colors.focused.indicator,
data/sway-1.5/sway/input/seatop_move_tiling.c:38: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(&box, &e->drop_box, sizeof(struct wlr_box));
data/sway-1.5/sway/ipc-server.c:260: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(&client->pending_length, &buf32[0], sizeof(buf32[0]));
data/sway-1.5/sway/ipc-server.c:261: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(&client->pending_type, &buf32[1], sizeof(buf32[1]));
data/sway-1.5/sway/ipc-server.c:410:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	const char *names[10];
data/sway-1.5/sway/ipc-server.c:439: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 buffer[64];
data/sway-1.5/sway/ipc-server.c:922: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[IPC_HEADER_SIZE];
data/sway-1.5/sway/ipc-server.c:925: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(data, ipc_magic, sizeof(ipc_magic));
data/sway-1.5/sway/ipc-server.c:926: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(&data32[0], &payload_length, sizeof(payload_length));
data/sway-1.5/sway/ipc-server.c:927: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(&data32[1], &payload_type, sizeof(payload_type));
data/sway-1.5/sway/ipc-server.c:949: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(client->write_buffer + client->write_buffer_len, data, IPC_HEADER_SIZE);
data/sway-1.5/sway/ipc-server.c:951: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(client->write_buffer + client->write_buffer_len, payload, payload_length);
data/sway-1.5/sway/main.c:51: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).
	FILE *f = fopen("/sys/firmware/devicetree/base/model", "r");
data/sway-1.5/sway/main.c:64: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).
	FILE *g = fopen("/proc/modules", "r");
data/sway-1.5/sway/main.c:87: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).
	FILE *f = fopen("/proc/modules", "r");
data/sway-1.5/sway/main.c:167: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(paths[i], "r");
data/sway-1.5/sway/main.c:219: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).
		server.txn_timeout_ms = atoi(&flag[12]);
data/sway-1.5/sway/swaynag.c:82: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 wayland_socket_str[16];
data/sway-1.5/sway/tree/root.c:206: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_name[100];
data/sway-1.5/sway/tree/root.c:212:2:  [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(file_name, "/proc/%d/stat", child);
data/sway-1.5/sway/tree/root.c:214: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 ((stat = fopen(file_name, "r"))) {
data/sway-1.5/sway/tree/root.c:323: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(&pw->time_added, &now, sizeof(struct timespec));
data/sway-1.5/sway/tree/workspace.c:177: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 identifier[128];
data/sway-1.5/sway/tree/workspace.c:289: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 identifier[128];
data/sway-1.5/sway/tree/workspace.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 name[12] = "";
data/sway-1.5/sway/tree/workspace.c:514: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 identifier[128];
data/sway-1.5/sway/tree/workspace.c:531: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 identifier[128];
data/sway-1.5/sway/tree/workspace.c:544: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 identifier[128];
data/sway-1.5/sway/tree/workspace.c:552: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 exclude_id[128] = {'\0'};
data/sway-1.5/swaybar/ipc.c:34:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(command, "workspace \"");
data/sway-1.5/swaybar/ipc.c:422: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 subscribe[128]; // suitably large buffer
data/sway-1.5/swaybar/tray/icon.c:216:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *theme_file = fopen(path, "r");
data/sway-1.5/swaybar/tray/icon.c:368: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, sep, sep_len);
data/sway-1.5/swaybar/tray/icon.c:374:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(p, theme->name, name_len);
data/sway-1.5/swaybar/tray/item.c:342:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		static const char *default_bindings[10] = {
data/sway-1.5/swaynag/config.c:339:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *config = fopen(path, "r");
data/sway-1.5/swaynag/swaynag.c:22:20:  [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).
	FILE *tmp= fdopen(mkstemp(fname), "w");
data/sway-1.5/client/pool-buffer.c:24: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).
	size_t name_size = strlen(template) + 1 + strlen(path) + 1;
data/sway-1.5/client/pool-buffer.c:24:44:  [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 name_size = strlen(template) + 1 + strlen(path) + 1;
data/sway-1.5/common/ipc-client.c:63:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(addr.sun_path, socket_path, sizeof(addr.sun_path) - 1);
data/sway-1.5/common/stringop.c:16: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(str);
data/sway-1.5/common/stringop.c:61:10:  [1] (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.
		return strncat(dest, src, len);
data/sway-1.5/common/stringop.c:130:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(token, start, end - start + 1);
data/sway-1.5/common/stringop.c:154: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).
	int len = strlen(string);
data/sway-1.5/common/stringop.c:242: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(argv[i]) + 1;
data/sway-1.5/common/stringop.c:248: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(argv[i]);
data/sway-1.5/common/stringop.c:317: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).
		*path = realloc(*path, strlen(*path) + 2);
data/sway-1.5/common/stringop.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).
		memmove(ptr + 1, ptr, strlen(ptr) + 1);
data/sway-1.5/common/util.c:27: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).
	int len = strlen(color);
data/sway-1.5/include/swaybar/status_line.h:21:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	FILE *read, *write;
data/sway-1.5/sway/commands.c:240: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).
				head += strlen(criteria->raw);
data/sway-1.5/sway/commands.c:385:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		char *temp = calloc(1, strlen(argv[1]) + 2);
data/sway-1.5/sway/commands/assign.c:27: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 (strncmp(*argv, "→", strlen("→")) == 0) {
data/sway-1.5/sway/commands/bar/gaps.c:22: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(end) && strcasecmp(end, "px") != 0) {
data/sway-1.5/sway/commands/bar/status_edge_padding.c:13:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(end) || padding < 0) {
data/sway-1.5/sway/commands/bar/status_padding.c:13:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(end) || padding < 0) {
data/sway-1.5/sway/commands/bind.c:371: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).
					strlen("--input-device=")) == 0) {
data/sway-1.5/sway/commands/bind.c:373: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).
			binding->input = strdup(argv[0] + strlen("--input-device="));
data/sway-1.5/sway/commands/bind.c:401: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(split->items[i], "Group", strlen("Group")) == 0) {
data/sway-1.5/sway/commands/bind.c:409: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).
			int group = strtol(split->items[i] + strlen("Group"), &end, 10);
data/sway-1.5/sway/commands/exec_always.c:43:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cmd, tmp, sizeof(cmd) - 1);
data/sway-1.5/sway/commands/exec_always.c:81:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		s += read(fd[0], ((uint8_t *)&child) + s, sizeof(pid_t) - s);
data/sway-1.5/sway/commands/gaps.c:56:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(end) && strcasecmp(end, "px") != 0) {
data/sway-1.5/sway/commands/gaps.c:189:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(end) && strcasecmp(end, "px") != 0) {
data/sway-1.5/sway/commands/input/events.c:80:54:  [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 char *type = strncmp(ic->identifier, "type:", strlen("type:")) == 0
data/sway-1.5/sway/commands/input/events.c:81: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).
		? ic->identifier + strlen("type:") : NULL;
data/sway-1.5/sway/commands/input/events.c:141: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).
				strncmp(ic->identifier, "type:", strlen("type:")) == 0) {
data/sway-1.5/sway/commands/output/background.c:23:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(color) != 7 || color[0] != '#') {
data/sway-1.5/sway/commands/output/background.c:106: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).
			src = malloc(strlen(conf_path) + strlen(src) + 2);
data/sway-1.5/sway/commands/output/background.c:106: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).
			src = malloc(strlen(conf_path) + strlen(src) + 2);
data/sway-1.5/sway/commands/set.c:15: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).
	return strlen(r->name) - strlen(l->name);
data/sway-1.5/sway/commands/set.c:15: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).
	return strlen(r->name) - strlen(l->name);
data/sway-1.5/sway/commands/workspace.c:81:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(end)) {
data/sway-1.5/sway/config.c:553: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).
	int len = strlen(path);
data/sway-1.5/sway/config.c:555: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).
		len = len + strlen(parent_dir) + 2;
data/sway-1.5/sway/config.c:728: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).
	int size = (block ? strlen(block) + 1 : 0) + strlen(line)
data/sway-1.5/sway/config.c:728:47:  [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 size = (block ? strlen(block) + 1 : 0) + strlen(line)
data/sway-1.5/sway/config.c:780:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			strcpy(&this_config[read], line);
data/sway-1.5/sway/config.c:796: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).
		if (line[strlen(line) - 1] != '{' && line[strlen(line) - 1] != '}') {
data/sway-1.5/sway/config.c:796:45:  [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 (line[strlen(line) - 1] != '{' && line[strlen(line) - 1] != '}') {
data/sway-1.5/sway/config.c:916:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			size_t length = strlen(find + 1);
data/sway-1.5/sway/config.c:925:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			int vnlen = strlen(var->name);
data/sway-1.5/sway/config.c:927:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				int vvlen = strlen(var->value);
data/sway-1.5/sway/config.c:928: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 *newstr = malloc(strlen(str) - vnlen + vvlen + 1);
data/sway-1.5/sway/config.c:937:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(newptr, str, offset);
data/sway-1.5/sway/config.c:939:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(newptr, var->value, vvlen);
data/sway-1.5/sway/config/input.c:270:47:  [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).
	bool type = strncmp(ic->identifier, "type:", strlen("type:")) == 0;
data/sway-1.5/sway/criteria.c:51:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int len = strlen(fmt) + strlen(value) + strlen(reg_err) - 3;
data/sway-1.5/sway/criteria.c:51: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).
		int len = strlen(fmt) + strlen(value) + strlen(reg_err) - 3;
data/sway-1.5/sway/criteria.c:51:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int len = strlen(fmt) + strlen(value) + strlen(reg_err) - 3;
data/sway-1.5/sway/criteria.c:103: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).
	return pcre_exec(regex, NULL, item, strlen(item), 0, 0, NULL, 0);
data/sway-1.5/sway/criteria.c:514:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int len = strlen(fmt) + strlen(name) - 1;
data/sway-1.5/sway/criteria.c:514: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).
		int len = strlen(fmt) + strlen(name) - 1;
data/sway-1.5/sway/criteria.c:523:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int len = strlen(fmt) + strlen(name) - 1;
data/sway-1.5/sway/criteria.c:523: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).
		int len = strlen(fmt) + strlen(name) - 1;
data/sway-1.5/sway/criteria.c:628: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).
	char *copy = calloc(strlen(value) + 1, 1);
data/sway-1.5/sway/criteria.c:679:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(name, namestart, head - namestart);
data/sway-1.5/sway/criteria.c:706:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(value, valuestart, head - valuestart);
data/sway-1.5/sway/criteria.c:737:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(criteria->raw, raw, len);
data/sway-1.5/sway/desktop/xwayland.c:712: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).
			xcb_intern_atom(xcb_conn, 0, strlen(atom_map[i]), atom_map[i]);
data/sway-1.5/sway/input/cursor.c:1154: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 (strncasecmp(name, "button", strlen("button")) == 0) {
data/sway-1.5/sway/input/cursor.c:1156: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).
		int number = name[strlen("button")] - '0';
data/sway-1.5/sway/input/cursor.c:1157:35:  [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 (number < 1 || number > 9 || strlen(name) > strlen("button0")) {
data/sway-1.5/sway/input/cursor.c:1157:50:  [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 (number < 1 || number > 9 || strlen(name) > strlen("button0")) {
data/sway-1.5/sway/input/cursor.c:1166:35:  [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 (strncmp(name, "BTN_", strlen("BTN_")) == 0) {
data/sway-1.5/sway/input/cursor.c:1195:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (!event || strncmp(event, "BTN_", strlen("BTN_")) != 0) {
data/sway-1.5/sway/ipc-server.c:102:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(ipc_sockaddr->sun_path, getenv("SWAYSOCK"), sizeof(ipc_sockaddr->sun_path) - 1);
data/sway-1.5/sway/ipc-server.c:292: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).
				(uint32_t)strlen(json_string))) {
data/sway-1.5/sway/ipc-server.c:638: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).
			size_t line_length = strlen(line);
data/sway-1.5/sway/ipc-server.c:649:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int length = strlen(json);
data/sway-1.5/sway/ipc-server.c:698:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			(uint32_t)strlen(json_string));
data/sway-1.5/sway/ipc-server.c:709:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			(uint32_t)strlen(json_string));
data/sway-1.5/sway/ipc-server.c:720:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			ipc_send_reply(client, payload_type, msg, strlen(msg));
data/sway-1.5/sway/ipc-server.c:750:47:  [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).
				ipc_send_reply(client, payload_type, msg, strlen(msg));
data/sway-1.5/sway/ipc-server.c:759:45:  [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).
		ipc_send_reply(client, payload_type, msg, strlen(msg));
data/sway-1.5/sway/ipc-server.c:763: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).
				strlen(tickmsg));
data/sway-1.5/sway/ipc-server.c:777:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			(uint32_t)strlen(json_string));
data/sway-1.5/sway/ipc-server.c:791:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			(uint32_t)strlen(json_string));
data/sway-1.5/sway/ipc-server.c:801:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			(uint32_t)strlen(json_string));
data/sway-1.5/sway/ipc-server.c:812:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			(uint32_t)strlen(json_string));
data/sway-1.5/sway/ipc-server.c:822:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			(uint32_t)strlen(json_string));
data/sway-1.5/sway/ipc-server.c:838: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).
				(uint32_t)strlen(json_string));
data/sway-1.5/sway/ipc-server.c:853:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					(uint32_t)strlen(error));
data/sway-1.5/sway/ipc-server.c:859: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).
				(uint32_t)strlen(json_string));
data/sway-1.5/sway/ipc-server.c:874:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			(uint32_t)strlen(json_string));
data/sway-1.5/sway/ipc-server.c:884:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			(uint32_t)strlen(json_string));
data/sway-1.5/sway/ipc-server.c:895:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			(uint32_t)strlen(json_string));
data/sway-1.5/sway/ipc-server.c:904:45:  [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).
		ipc_send_reply(client, payload_type, msg, strlen(msg));
data/sway-1.5/sway/main.c:126: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).
	uint32_t len = strlen(command);
data/sway-1.5/sway/swaynag.c:87:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			size_t length = strlen(swaynag_command) + strlen(swaynag->args) + 2;
data/sway-1.5/sway/swaynag.c:87:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			size_t length = strlen(swaynag_command) + strlen(swaynag->args) + 2;
data/sway-1.5/sway/tree/container.c:585: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(identifier);
data/sway-1.5/sway/tree/container.c:1489: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(mark) + 2;
data/sway-1.5/sway/tree/view.c:1082:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t len = strlen(escaped_value);
data/sway-1.5/sway/tree/view.c:1087: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(value);
data/sway-1.5/sway/tree/view.c:1132: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(format);
data/sway-1.5/sway/tree/workspace.c:226: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).
					strlen("next_on_output")) == 0 ||
data/sway-1.5/sway/tree/workspace.c:228: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).
					strlen("next_on_output")) == 0 ||
data/sway-1.5/sway/tree/workspace.c:238:35:  [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(_target, "number ", strlen("number ")) == 0) {
data/sway-1.5/sway/tree/workspace.c:239:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			size_t length = strlen(_target) - strlen("number ") + 1;
data/sway-1.5/sway/tree/workspace.c:239: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).
			size_t length = strlen(_target) - strlen("number ") + 1;
data/sway-1.5/sway/tree/workspace.c:241:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(temp, _target + strlen("number "), length - 1);
data/sway-1.5/sway/tree/workspace.c:241: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).
			strncpy(temp, _target + strlen("number "), length - 1);
data/sway-1.5/swaybar/bar.c:305:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(output->identifier, description, length);
data/sway-1.5/swaybar/i3bar.c:141:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ssize_t read_bytes = read(status->read_fd, status->buffer, status->buffer_size);
data/sway-1.5/swaybar/i3bar.c:247:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ssize_t read_bytes = read(status->read_fd, &status->buffer[status->buffer_index],
data/sway-1.5/swaybar/input.c:73: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 (env_cursor_size && strlen(env_cursor_size) > 0) {
data/sway-1.5/swaybar/ipc.c:22: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).
	uint32_t size = strlen("workspace \"\"") + strlen(ws);
data/sway-1.5/swaybar/ipc.c:22:45:  [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).
	uint32_t size = strlen("workspace \"\"") + strlen(ws);
data/sway-1.5/swaybar/ipc.c:23: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).
	for (size_t i = 0; i < strlen(ws); ++i) {
data/sway-1.5/swaybar/ipc.c:35:2:  [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(&command[size - 1], "\"");
data/sway-1.5/swaybar/ipc.c:36: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).
	for (size_t i = 0, d = strlen("workspace \""); i < strlen(ws); ++i) {
data/sway-1.5/swaybar/ipc.c:36:53:  [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 i = 0, d = strlen("workspace \""); i < strlen(ws); ++i) {
data/sway-1.5/swaybar/ipc.c:406: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).
	uint32_t len = strlen(bind->command);
data/sway-1.5/swaybar/ipc.c:412: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).
	uint32_t len = strlen(bar->id);
data/sway-1.5/swaybar/status_line.c:60:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read_bytes = read(status->read_fd, status->buffer, available_bytes);
data/sway-1.5/swaybar/status_line.c:110: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).
			status->buffer_index = strlen(newline + 1);
data/sway-1.5/swaybar/status_line.c:126:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					&status->buffer_size, status->read);
data/sway-1.5/swaybar/status_line.c:128:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				clearerr(status->read);
data/sway-1.5/swaybar/tray/icon.c:353:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t sep_len = strlen(sep);
data/sway-1.5/swaybar/tray/icon.c:358: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(theme->name) + sep_len;
data/sway-1.5/swaybar/tray/icon.c:373: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).
		size_t name_len = strlen(theme->name);
data/sway-1.5/swaybar/tray/item.c:363: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).
	if (strncmp(method, "Scroll", strlen("Scroll")) == 0) {
data/sway-1.5/swaybar/tray/item.c:364: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).
		char dir = method[strlen("Scroll")];
data/sway-1.5/swaybar/tray/watcher.c:14: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).
	return watcher->interface[strlen("org.")] == 'f'; // freedesktop
data/sway-1.5/swaybar/tray/watcher.c:35: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).
				cmp_id(id, service) : strncmp(id, service, strlen(service));
data/sway-1.5/swaymsg/main.c:479: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).
	uint32_t len = strlen(command);
data/sway-1.5/swaynag/config.c:372:4:  [1] (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.
			strncat(name, line + 1, close - line - 1);
data/sway-1.5/swaynag/render.c:99:47:  [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).
	pango_layout_set_text(layout, text + offset, strlen(text) - offset);
data/sway-1.5/swaynag/swaynag.c:31: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).
	char *cmd = malloc(sizeof(char) * (strlen(terminal) + strlen(" -e ") + strlen(fname) + 1));
data/sway-1.5/swaynag/swaynag.c:31:56:  [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 *cmd = malloc(sizeof(char) * (strlen(terminal) + strlen(" -e ") + strlen(fname) + 1));
data/sway-1.5/swaynag/swaynag.c:31:73:  [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 *cmd = malloc(sizeof(char) * (strlen(terminal) + strlen(" -e ") + strlen(fname) + 1));
data/sway-1.5/swaynag/swaynag.c:61: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 (button->terminal && terminal && strlen(terminal)) {
data/sway-1.5/swaynag/swaynag.c:141: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 (env_cursor_size && strlen(env_cursor_size) > 0) {

ANALYSIS SUMMARY:

Hits = 313
Lines analyzed = 47511 in approximately 1.06 seconds (44978 lines/second)
Physical Source Lines of Code (SLOC) = 39663
Hits@level = [0] 106 [1] 137 [2]  98 [3]  28 [4]  49 [5]   1
Hits@level+ = [0+] 419 [1+] 313 [2+] 176 [3+]  78 [4+]  50 [5+]   1
Hits/KSLOC@level+ = [0+] 10.564 [1+] 7.89149 [2+] 4.43738 [3+] 1.96657 [4+] 1.26062 [5+] 0.0252124
Dot directories skipped = 3 (--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.