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/tmate-ssh-server-2.3.0-49-g97d20249/alerts.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/arguments.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/array.h
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/attributes.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cfg.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/client.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-attach-session.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-bind-key.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-break-pane.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-capture-pane.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-choose-buffer.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-choose-client.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-choose-tree.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-clear-history.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-command-prompt.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-confirm-before.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-copy-mode.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-detach-client.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-display-message.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-display-panes.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-find-window.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-find.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-if-shell.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-join-pane.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-kill-pane.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-kill-server.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-kill-session.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-kill-window.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-list-buffers.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-list-clients.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-list-keys.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-list-panes.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-list-sessions.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-list-windows.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-list.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-load-buffer.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-lock-server.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-move-window.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-new-session.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-new-window.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-paste-buffer.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-pipe-pane.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-queue.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-refresh-client.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-rename-session.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-rename-window.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-resize-pane.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-respawn-pane.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-respawn-window.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-rotate-window.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-run-shell.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-save-buffer.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-select-layout.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-select-pane.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-select-window.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-send-keys.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-set-buffer.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-set-environment.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-set-hook.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-set-option.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-show-environment.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-show-messages.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-show-options.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-source-file.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-split-window.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-string.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-swap-pane.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-swap-window.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-switch-client.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-unbind-key.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-wait-for.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/cmd.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/colour.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat.h
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/asprintf.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/b64_ntop.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/bitstring.h
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/cfmakeraw.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/closefrom.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/daemon.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/fgetln.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/forkpty-aix.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/forkpty-hpux.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/forkpty-sunos.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/fparseln.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/getopt.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/imsg-buffer.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/imsg.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/imsg.h
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/openat.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/queue.h
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/reallocarray.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/setenv.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/strcasestr.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/strlcat.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/strlcpy.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/strsep.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/strtonum.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/tree.h
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/unvis.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/vis.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/compat/vis.h
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/control-notify.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/control.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/environ.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/format.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/grid-view.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/hooks.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/input-keys.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/input.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/job.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/key-bindings.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/key-string.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/layout-custom.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/layout-set.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/layout.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/log.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/mode-key.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/names.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/notify.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/options-table.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/options.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-aix.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-cygwin.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-darwin.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-dragonfly.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-freebsd.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-hpux.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-linux.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-netbsd.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-openbsd.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-sunos.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-unknown.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/paste.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/proc.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/resize.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/screen-redraw.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/screen-write.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/screen.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/server-client.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/server-fn.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/server.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/session.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/signal.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/status.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/style.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-auth-keys.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-daemon-decoder.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-daemon-encoder.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-daemon-legacy.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-debug.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-main.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-msgpack.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-protocol.h
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-rand.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-client-pty.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-daemon.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-exec.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-latency.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-server.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-websocket.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmate.h
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.h
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tty-acs.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tty-keys.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tty-term.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/utf8.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/window-choose.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/window-clock.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.h
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/window.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/xmalloc.c
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/xmalloc.h
Examining data/tmate-ssh-server-2.3.0-49-g97d20249/xterm-keys.c

FINAL RESULTS:

data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-aix.c:80:6:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	n = readlink(path, target, MAXPATHLEN);
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-cygwin.c:75:6:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	n = readlink(path, target, MAXPATHLEN);
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-linux.c:76:6:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	n = readlink(path, target, MAXPATHLEN);
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-linux.c:81:7:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
		n = readlink(path, target, MAXPATHLEN);
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-sunos.c:88:6:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	n = readlink(path, target, MAXPATHLEN);
data/tmate-ssh-server-2.3.0-49-g97d20249/server.c:313:3:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
		chmod(socket_path, mode);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-main.c:160:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	if ((chmod(TMATE_WORKDIR, 0701)             < 0) ||
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-main.c:161:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	    (chmod(TMATE_WORKDIR "/sessions", 0703) < 0) ||
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-main.c:162:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	    (chmod(TMATE_WORKDIR "/jail", 0700)     < 0))
data/tmate-ssh-server-2.3.0-49-g97d20249/cfg.c:63:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(TMUX_CONF, R_OK) == 0) {
data/tmate-ssh-server-2.3.0-49-g97d20249/cfg.c:71: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(cfg_file, R_OK) != 0 && errno == ENOENT) {
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:507: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(shell, argv0, "-c", shellcmd, (char *) NULL);
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:732:3:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		system(data);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-pipe-pane.c:127:3:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execl(_PATH_BSHELL, "sh", "-c", cmd, (char *) NULL);
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/asprintf.c:49:11:  [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.
	if ((n = vsnprintf(NULL, 0, fmt, ap)) < 0)
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/asprintf.c:53:11:  [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.
	if ((n = vsnprintf(*ret, n + 1, fmt, ap2)) < 0) {
data/tmate-ssh-server-2.3.0-49-g97d20249/job.c:100:3:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execl(_PATH_BSHELL, "sh", "-c", cmd, (char *) NULL);
data/tmate-ssh-server-2.3.0-49-g97d20249/server-client.c:1284: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(data, X_OK) == 0)
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-daemon-encoder.c:19: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(msg, sizeof(msg), fmt, ap);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-debug.c:48:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(cmd, "addr2line -e %s %s -f -p -s", file, address);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-debug.c:50: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.
	ps = popen(cmd, "r");
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-server.c:384:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(path, "%s/%s", keys_dir, name);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-server.c:386:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(path, F_OK) < 0)
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.c:89:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(shell, X_OK) != 0)
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.h:78:50:  [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 printflike(a, b) __attribute__ ((format (printf, a, b)))
data/tmate-ssh-server-2.3.0-49-g97d20249/window.c:921:5:  [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(argvp[0], argvp);
data/tmate-ssh-server-2.3.0-49-g97d20249/window.c:930: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(wp->shell, argv0, "-c", first, (char *)NULL);
data/tmate-ssh-server-2.3.0-49-g97d20249/window.c:937:3:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execl(wp->shell, argv0, (char *)NULL);
data/tmate-ssh-server-2.3.0-49-g97d20249/xmalloc.c:133:6:  [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.
	i = vsnprintf(str, len, fmt, ap);
data/tmate-ssh-server-2.3.0-49-g97d20249/xmalloc.h:32:30:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		__attribute__((__format__ (printf, 2, 3)))
data/tmate-ssh-server-2.3.0-49-g97d20249/xmalloc.h:37:30:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		__attribute__((__format__ (printf, 3, 4)))
data/tmate-ssh-server-2.3.0-49-g97d20249/arguments.c:94:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, template)) != -1) {
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:423:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ((s = getenv("TERM")) == NULL)
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-load-buffer.c:87:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if (realpath(file, resolved) == NULL &&
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-save-buffer.c:115:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if (realpath(file, resolved) == NULL &&
data/tmate-ssh-server-2.3.0-49-g97d20249/compat.h:285:9:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
#define getopt(ac, av, o)  BSDgetopt(ac, av, o)
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-main.c:105:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "b:h:k:p:q:w:z:xv")) != -1) {
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-main.c:238:6:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
	if (chroot(TMATE_WORKDIR "/jail") < 0)
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.c:71: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.
	shell = getenv("SHELL");
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.c:124:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ((s = getenv("TMUX_TMPDIR")) != NULL && *s != '\0')
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.c:143:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if (realpath(base, resolved) == NULL)
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.c:184:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	home = getenv("HOME");
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.c:221:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "2c:Cdf:lL:qS:uUVv")) != -1) {
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.c:284: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("TMUX") != NULL)
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.c:287: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.
		s = getenv("LC_ALL");
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.c:289: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.
			s = getenv("LC_CTYPE");
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.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.
			s = getenv("LANG");
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.c:318:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ((s = getenv("VISUAL")) != NULL || (s = getenv("EDITOR")) != NULL) {
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.c:318: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.
	if ((s = getenv("VISUAL")) != NULL || (s = getenv("EDITOR")) != NULL) {
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.c:335: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.
		s = getenv("TMUX");
data/tmate-ssh-server-2.3.0-49-g97d20249/array.h:107: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((a)->list + (a)->num, (b)->list, (b)->num * ARRAY_ITEMSIZE(a)); \
data/tmate-ssh-server-2.3.0-49-g97d20249/attributes.c:28:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	buf[128];
data/tmate-ssh-server-2.3.0-49-g97d20249/cfg.c:87: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		 delim[3] = { '\\', '\\', '\0' };
data/tmate-ssh-server-2.3.0-49-g97d20249/cfg.c:94:11:  [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 ((f = fopen(path, "rb")) == NULL) {
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:80:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((lockfd = open(lockfile, O_WRONLY|O_CREAT, 0600)) == -1) {
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:181:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char msg[256];
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:226: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			*cause, path[PATH_MAX];
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:602: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(&retval, data, sizeof retval);
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:624: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(&stdoutdata, data, sizeof stdoutdata);
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:632: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(&stderrdata, data, sizeof stderrdata);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-capture-pane.c:56:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf + *len, line, linelen);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-capture-pane.c:66:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		*buf, *line, tmp[5];
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-find.c:87:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			 tmp[256];
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-if-shell.c:120: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(&cdata->mouse, &cmdq->item->mouse, sizeof cdata->mouse);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-list-keys.c:64: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			*cp, tmp[BUFSIZ];
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-load-buffer.c:56: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		*pdata, *new_pdata, *cause, *file, resolved[PATH_MAX];
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-load-buffer.c:92:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = fopen(resolved, "rb");
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-load-buffer.c:154: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(pdata, EVBUFFER_DATA(c->stdin_data), psize);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-pipe-pane.c:117:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		null_fd = open(_PATH_DEVNULL, O_WRONLY, 0);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-queue.c:180: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(&item->mouse, m, sizeof item->mouse);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-run-shell.c:142: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(line, EVBUFFER_DATA(job->event->input), size);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-save-buffer.c:67:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			*msg, *file, resolved[PATH_MAX];
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-save-buffer.c:120:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = fopen(resolved, flags);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-set-buffer.c:108: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(bufdata, olddata, bufsize);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-set-buffer.c:112: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(bufdata + bufsize, args->argv[0], newsize);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd.c:316:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			 s[BUFSIZ];
data/tmate-ssh-server-2.3.0-49-g97d20249/colour.c:361:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	s[32];
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/closefrom.c:73:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char fdpath[PATH_MAX], *endp;
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/daemon.c:57:24:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/forkpty-aix.c:38:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((*master = open("/dev/ptc", O_RDWR|O_NOCTTY)) == -1)
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/forkpty-aix.c:47:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((slave = open(path, O_RDWR|O_NOCTTY)) == -1)
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/forkpty-aix.c:63:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(_PATH_TTY, O_RDWR|O_NOCTTY);
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/forkpty-aix.c:72:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(_PATH_TTY, O_RDWR|O_NOCTTY);
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/forkpty-aix.c:76:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(path, O_RDWR);
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/forkpty-aix.c:81:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open("/dev/tty", O_WRONLY);
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/forkpty-hpux.c:34:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((*master = open("/dev/ptmx", O_RDWR|O_NOCTTY)) == -1)
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/forkpty-hpux.c:45:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((slave = open(path, O_RDWR|O_NOCTTY)) == -1)
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/forkpty-sunos.c:35:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((*master = open("/dev/ptmx", O_RDWR|O_NOCTTY)) == -1)
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/forkpty-sunos.c:46:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((slave = open(path, O_RDWR|O_NOCTTY)) == -1)
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/fparseln.c:82:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char *
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/fparseln.c:83:56:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
fparseln(FILE *fp, size_t *size, size_t *lineno, const char str[3],
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/fparseln.c:86:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const char dstr[3] = { '\\', '\\', '#' };
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/fparseln.c:147:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(void) memcpy(buf + len, ptr, s);
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/imsg-buffer.c:97:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf->buf + buf->wpos, data, len);
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/imsg-buffer.c:233:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char		buf[CMSG_SPACE(sizeof(int))];
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/imsg.c:87:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char	buf[CMSG_SPACE(sizeof(int) * 1)];
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/imsg.c:187: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(imsg->data, ibuf->r.rptr, datalen);
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/openat.c:40:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		dotfd = open(".", O_RDONLY);
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/openat.c:51:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	retval = open(path, flags, mode);
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/vis.c:170: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 tbuf[5];
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/vis.c:191:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(dst, tbuf, i);
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:213: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(buf, EVBUFFER_DATA(job->event->input), len);
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:295:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char host[HOST_NAME_MAX + 1];
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:307:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char host[HOST_NAME_MAX + 1], *cp;
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:331: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		 alerts[256], tmp[16];
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:618:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char		 s[64];
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:719: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(copy, key, keylen);
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:832: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(new, to, tolen);
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:859:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(*buf + *off, value, valuelen);
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:940: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(tmp, fmt, n);
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:954: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(buf + off, out, outlen);
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:214: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(gl_history, gl_upper, sizeof *gl_history);
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:258: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(gc, &grid_default_cell, sizeof *gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:267: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(gc, &grid_default_cell, sizeof *gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:269: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(gc, &gl->extddata[gce->offset], sizeof *gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:313: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(gcp, gc, sizeof *gcp);
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:551:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	tmp[64];
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:637:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			*buf, code[128];
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:643: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(&lastgc1, &grid_default_cell, sizeof lastgc1);
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:663: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(*lastgc, &gc, sizeof **lastgc);
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:680: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(buf + off, code, codelen);
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:683: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(buf + off, data, size);
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:718: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(dstl, srcl, sizeof *dstl);
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:722: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(dstl->celldata, srcl->celldata,
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:731: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(dstl->extddata, srcl->extddata, dstl->extdsize *
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.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(&dst_gl->celldata[to], &src_gl->celldata[from],
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:760: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_gl->extddata[gce->offset], &src_gl->extddata[was],
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:853: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(dst_gl, src_gl, sizeof *dst_gl);
data/tmate-ssh-server-2.3.0-49-g97d20249/input-keys.c:239:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	buf[40];
data/tmate-ssh-server-2.3.0-49-g97d20249/input.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(&ictx->cell.cell, &grid_default_cell, sizeof ictx->cell.cell);
data/tmate-ssh-server-2.3.0-49-g97d20249/input.c:752: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(&ictx->old_cell, &ictx->cell, sizeof ictx->old_cell);
data/tmate-ssh-server-2.3.0-49-g97d20249/input.c:1173: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(&ictx->old_cell, &ictx->cell, sizeof ictx->old_cell);
data/tmate-ssh-server-2.3.0-49-g97d20249/input.c:1178: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(&ictx->cell, &ictx->old_cell, sizeof ictx->cell);
data/tmate-ssh-server-2.3.0-49-g97d20249/input.c:1368: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(&ictx->cell, &ictx->old_cell, sizeof ictx->cell);
data/tmate-ssh-server-2.3.0-49-g97d20249/input.c:1378: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(&ictx->old_cell, &ictx->cell, sizeof ictx->old_cell);
data/tmate-ssh-server-2.3.0-49-g97d20249/input.c:1701: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(gc, &grid_default_cell, sizeof *gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/input.c:1724: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(gc, &grid_default_cell, sizeof *gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/job.c:90:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		nullfd = open(_PATH_DEVNULL, O_RDWR, 0);
data/tmate-ssh-server-2.3.0-49-g97d20249/key-string.c:225:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char		out[24];
data/tmate-ssh-server-2.3.0-49-g97d20249/key-string.c:226:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			tmp[8];
data/tmate-ssh-server-2.3.0-49-g97d20249/key-string.c:273: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(out, ud.data, ud.size);
data/tmate-ssh-server-2.3.0-49-g97d20249/layout-custom.c:62: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	layout[BUFSIZ], *out;
data/tmate-ssh-server-2.3.0-49-g97d20249/layout-custom.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			tmp[64];
data/tmate-ssh-server-2.3.0-49-g97d20249/names.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(&w->name_time, &tv, sizeof w->name_time);
data/tmate-ssh-server-2.3.0-49-g97d20249/options-table.c:923:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	 out[BUFSIZ];
data/tmate-ssh-server-2.3.0-49-g97d20249/options.c:136: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(&o->style, &grid_default_cell, sizeof o->style);
data/tmate-ssh-server-2.3.0-49-g97d20249/options.c:168: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(&o->style, &grid_default_cell, sizeof o->style);
data/tmate-ssh-server-2.3.0-49-g97d20249/options.c:198: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(&tmpgc, &grid_default_cell, sizeof tmpgc);
data/tmate-ssh-server-2.3.0-49-g97d20249/options.c:200: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(&tmpgc, &o->style, sizeof tmpgc);
data/tmate-ssh-server-2.3.0-49-g97d20249/options.c:213: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(&o->style, &tmpgc, sizeof o->style);
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-aix.c:37:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((ttyfd = open(tty, O_RDONLY|O_NOCTTY)) == -1)
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-aix.c:46:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = open(path, O_RDONLY);
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-aix.c:62:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char      target[MAXPATHLEN + 1];
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-aix.c:71:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((ttyfd = open(ttypath, O_RDONLY|O_NOCTTY)) == -1)
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-cygwin.c:42:11:  [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 ((f = fopen(path, "r")) == NULL) {
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-cygwin.c:66:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	 target[MAXPATHLEN + 1];
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-darwin.c:55:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char			wd[PATH_MAX];
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-freebsd.c:138:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char		 wd[PATH_MAX];
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-linux.c:43:11:  [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 ((f = fopen(path, "r")) == NULL) {
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-linux.c:67:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	 target[MAXPATHLEN + 1];
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-openbsd.c:143:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	path[MAXPATHLEN];
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-sunos.c:41:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((f = open(tty, O_RDONLY)) < 0)
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-sunos.c:51:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = open(path, O_RDONLY);
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-sunos.c:70:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	 target[MAXPATHLEN + 1];
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-sunos.c:79:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((ttyfd = open(ttypath, O_RDONLY|O_NOCTTY)) == -1)
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-redraw.c:287:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			 msg[256];
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-redraw.c:320: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(&m_other_gc, &other_gc, sizeof m_other_gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-redraw.c:322: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(&m_active_gc, &active_gc, sizeof m_active_gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-redraw.c:352: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(&msg_gc, &grid_default_cell, sizeof msg_gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-redraw.c:401:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			 buf[16], *ptr;
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-redraw.c:427: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(&gc, &grid_default_cell, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-redraw.c:454: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(&gc, &grid_default_cell, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-write.c:245: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(&lgc, gc, sizeof lgc);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-write.c:368: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(&gc, &grid_default_cell, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-write.c:375: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(&ttyctx->last_cell, &gc, sizeof ttyctx->last_cell);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-write.c:512: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(&gc, &grid_default_cell, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-write.c:968: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(&tmp_gc, &grid_default_cell, sizeof tmp_gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-write.c:993: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(&tmp_gc, &s->sel.cell, sizeof tmp_gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-write.c:1034: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(gc.data.data + gc.data.size, ud->data, ud->size);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen.c:249: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(&sel->cell, gc, sizeof sel->cell);
data/tmate-ssh-server-2.3.0-49-g97d20249/server-client.c:125: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(&c->activity_time, &c->creation_time, sizeof c->activity_time);
data/tmate-ssh-server-2.3.0-49-g97d20249/server-client.c:1120: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(&stdindata, data, sizeof stdindata);
data/tmate-ssh-server-2.3.0-49-g97d20249/server-client.c:1198: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, imsg->data, sizeof data);
data/tmate-ssh-server-2.3.0-49-g97d20249/server-client.c:1265: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(&flags, data, sizeof flags);
data/tmate-ssh-server-2.3.0-49-g97d20249/server-client.c:1308: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(&c->pid, data, sizeof c->pid);
data/tmate-ssh-server-2.3.0-49-g97d20249/server-client.c:1345:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	c->fd = open(c->ttyname, O_RDWR|O_NOCTTY);
data/tmate-ssh-server-2.3.0-49-g97d20249/server-client.c:1428: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(data.data, EVBUFFER_DATA(c->stdout_data), sent);
data/tmate-ssh-server-2.3.0-49-g97d20249/server-client.c:1477: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(data.data, EVBUFFER_DATA(c->stderr_data), sent);
data/tmate-ssh-server-2.3.0-49-g97d20249/server-fn.c:320: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(&gc, &grid_default_cell, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/session.c:133: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(s->tio, tio, sizeof *s->tio);
data/tmate-ssh-server-2.3.0-49-g97d20249/session.c:264: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(last, &s->activity_time, sizeof *last);
data/tmate-ssh-server-2.3.0-49-g97d20249/session.c:268: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(&s->activity_time, from, sizeof s->activity_time);
data/tmate-ssh-server-2.3.0-49-g97d20249/session.c:676: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(&old_windows, &s->windows, sizeof old_windows);
data/tmate-ssh-server-2.3.0-49-g97d20249/session.c:694: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(&old_lastw, &s->lastw, sizeof old_lastw);
data/tmate-ssh-server-2.3.0-49-g97d20249/session.c:722: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(&old_wins, &s->windows, sizeof old_wins);
data/tmate-ssh-server-2.3.0-49-g97d20249/session.c:742: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(&old_lastw, &s->lastw, sizeof old_lastw);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:91:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = fopen(history_file, "r");
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:109:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(tmp, line, length);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:131:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = fopen(history_file, "w");
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:313: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(&old_status, &c->status, sizeof old_status);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:325: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(&lgc, &stdgc, sizeof lgc);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:327: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(&rgc, &stdgc, sizeof rgc);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:347: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(&wl->status_cell, &stdgc, sizeof wl->status_cell);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:445: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(&gc, &stdgc, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:454: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(&gc, &stdgc, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:640: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(&old_status, &c->status, sizeof old_status);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:767: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(&old_status, &c->status, sizeof old_status);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:825:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			*s, *first, *last, word[64], swapc;
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:892: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(word, first, last - first);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:910: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(first, s, strlen(s));
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1088: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(c->prompt_buffer + c->prompt_index, bufdata, n);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1095: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(c->prompt_buffer + c->prompt_index, bufdata, n);
data/tmate-ssh-server-2.3.0-49-g97d20249/style.c:33:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			tmp[32];
data/tmate-ssh-server-2.3.0-49-g97d20249/style.c:42: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(&savedgc, gc, sizeof savedgc);
data/tmate-ssh-server-2.3.0-49-g97d20249/style.c:52: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(tmp, in, end);
data/tmate-ssh-server-2.3.0-49-g97d20249/style.c:115: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(gc, &savedgc, sizeof *gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/style.c:124:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	 s[256];
data/tmate-ssh-server-2.3.0-49-g97d20249/style.c:191: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	newname[128];
data/tmate-ssh-server-2.3.0-49-g97d20249/style.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(gc, &grid_default_cell, sizeof *gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-daemon-encoder.c:16:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char msg[1024];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-daemon-encoder.c:230: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 target[64];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-daemon-encoder.c:231: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(target, "%d.%d", win_idx, pane_id);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-debug.c:22: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[100];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-debug.c:23: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[200];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-debug.c:24: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 output[300];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-debug.c:25: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 address[20];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-debug.c:42: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(file, &frame[matches[1].rm_so], matches[1].rm_eo - matches[1].rm_so);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-debug.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(address, &frame[matches[2].rm_so], matches[2].rm_eo - matches[2].rm_so);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-main.c:58: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 hostname[1024];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-main.c:117:31:  [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).
			tmate_settings->ssh_port = atoi(optarg);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-main.c:120:42:  [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).
			tmate_settings->ssh_port_advertized = atoi(optarg);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-main.c:126:37:  [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).
			tmate_settings->websocket_port = atoi(optarg);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-msgpack.c:250: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(alloc_buf, buf, len);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-rand.c:8:24:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((dev_urandom_fd = open("/dev/urandom", O_RDONLY)) < 0)
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-client-pty.c:59:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[4096];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-daemon.c:35: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(buf, data, len);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-server.c:20: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 port_arg[16] = {0};
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-server.c:28:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(port_arg, " -p%d", ssh_port_advertized);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-server.c:327: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 header[110];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-server.c:381:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char path[PATH_MAX];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-websocket.c:401: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(&servaddr.sin_addr, host->h_addr, host->h_length);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate.h:148: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 ip_address[64];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate.h:261: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 bytes[RS_BUF_SIZE];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.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		*base, resolved[PATH_MAX], *path, *s;
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.c:199:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		*path, *label, **var, tmp[PATH_MAX], *shellcmd = NULL;
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.h:456:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	data[BUFSIZ];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.h:461:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	data[BUFSIZ];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.h:466:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	data[BUFSIZ];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.h:903:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		 tty[TTY_NAME_MAX];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.h:1153: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		 acs[UCHAR_MAX + 1][2];
data/tmate-ssh-server-2.3.0-49-g97d20249/tmux.h:2264: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.
extern const char window_clock_table[14][5][5];
data/tmate-ssh-server-2.3.0-49-g97d20249/tty-term.c:274:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	buf[BUFSIZ];
data/tmate-ssh-server-2.3.0-49-g97d20249/tty-term.c:629:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	 s[256];
data/tmate-ssh-server-2.3.0-49-g97d20249/tty-term.c:630: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		 out[128];
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.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	name[64];
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:147:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	tty_log_fd = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0644);
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:282: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(&tio, orig_tio, sizeof tio);
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:302: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(&tty->cell, &grid_default_cell, sizeof tty->cell);
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:681: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(&gc, &grid_default_cell, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:1266: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(gc, &grid_default_cell, sizeof *gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:1443: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(&gc2, gc, sizeof gc2);
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:1657:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			 s[32];
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:1690: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(&tc->fg_rgb, &gc->fg_rgb, sizeof tc->fg_rgb);
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:1702:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			 s[32];
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:1733: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(&tc->bg_rgb, &gc->bg_rgb, sizeof tc->bg_rgb);
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:1743:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	s[32];
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:1780:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	s[32];
data/tmate-ssh-server-2.3.0-49-g97d20249/utf8.c:51: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(to, from, sizeof *to);
data/tmate-ssh-server-2.3.0-49-g97d20249/utf8.c:142:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	s[MB_LEN_MAX];
data/tmate-ssh-server-2.3.0-49-g97d20249/utf8.c:149: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(ud->data, s, slen);
data/tmate-ssh-server-2.3.0-49-g97d20249/utf8.c:286: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 + n, src->data, src->size);
data/tmate-ssh-server-2.3.0-49-g97d20249/utf8.c:396: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(out, s, slen);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-choose.c:99:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char				 tmp[10];
data/tmate-ssh-server-2.3.0-49-g97d20249/window-choose.c:756: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				 hdr[32], label[32];
data/tmate-ssh-server-2.3.0-49-g97d20249/window-choose.c:763: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(&gc, &grid_default_cell, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-choose.c:799: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(&gc, &grid_default_cell, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-clock.c:49:7:  [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 window_clock_table[14][5][5] = {
data/tmate-ssh-server-2.3.0-49-g97d20249/window-clock.c:203: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				 tim[64], *ptr;
data/tmate-ssh-server-2.3.0-49-g97d20249/window-clock.c:232: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(&gc, &grid_default_cell, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-clock.c:244: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(&gc, &grid_default_cell, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.c:167: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(&gc, &grid_default_cell, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.c:766: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(data->inputstr + inputlen, bufdata, n);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.c:963: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(&gc, &grid_default_cell, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.c:1029: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(&gc, &grid_default_cell, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.c:1100: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				 hdr[512];
data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.c:1137: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(&gc, &grid_default_cell, sizeof gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.c:1472: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(buf, bufdata, bufsize);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.c:1522:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(ud.data, s, ud.size);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.c:1527: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(*buf + *off, ud.data, ud.size);
data/tmate-ssh-server-2.3.0-49-g97d20249/window.c:692: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	flags[32];
data/tmate-ssh-server-2.3.0-49-g97d20249/window.c:742:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			 host[HOST_NAME_MAX + 1];
data/tmate-ssh-server-2.3.0-49-g97d20249/window.c:780: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(&wp->colgc, &grid_default_cell, sizeof wp->colgc);
data/tmate-ssh-server-2.3.0-49-g97d20249/window.c:845:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		 s[32];
data/tmate-ssh-server-2.3.0-49-g97d20249/window.c:891: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(tio2.c_cc, tio->c_cc, sizeof tio2.c_cc);
data/tmate-ssh-server-2.3.0-49-g97d20249/window.c:1064: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(&wp->saved_cell, gc, sizeof wp->saved_cell);
data/tmate-ssh-server-2.3.0-49-g97d20249/window.c:1105: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(gc, &wp->saved_cell, sizeof *gc);
data/tmate-ssh-server-2.3.0-49-g97d20249/attributes.c:57:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strchr(delimiters, str[strlen(str) - 1]) != NULL)
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:348: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).
			size += strlen(argv[i]) + 1;
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:408: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(tmate_session->ssh_client.pubkey) + 1);
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:418: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(tmate_session->ssh_client.ip_address) + 1);
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:425:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	proc_send(client_peer, MSG_IDENTIFY_TERM, -1, s, strlen(s) + 1);
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:428: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(ttynam) + 1);
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:429:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	proc_send(client_peer, MSG_IDENTIFY_CWD, -1, cwd, strlen(cwd) + 1);
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:439: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).
		sslen = strlen(*ss) + 1;
data/tmate-ssh-server-2.3.0-49-g97d20249/client.c:455:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	data.size = read(STDIN_FILENO, data.data, sizeof data.data);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-capture-pane.c:86:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    strlen(tmp));
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-capture-pane.c:165: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).
		linelen = strlen(line);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-find.c:434: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).
		if (strncmp(session, s_loop->name, strlen(session)) == 0) {
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-find.c:619: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(window, wl->window->name, strlen(window)) == 0) {
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-find.c:1229:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size = strlen(copy);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-list-keys.c:158: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).
		keywidth = strlen(key);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-list.c:44: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).
		arglen = strlen(copy_argv[i]);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-list.c:115: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(this) + 3;
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-load-buffer.c:101:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((ch = getc(f)) != EOF) {
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-paste-buffer.c:84: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).
		seplen = strlen(sepstr);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-queue.c:87: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).
			evbuffer_add(c->stdout_data, msg, strlen(msg));
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-queue.c:128: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).
			msglen = strlen(msg);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-set-buffer.c:99:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((newsize = strlen(args->argv[0])) == 0)
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-set-option.c:497:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strncmp(*choicep, value, strlen(value)) != 0)
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-show-environment.c:55: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).
	out = ret = xmalloc(strlen(value) * 2 + 1); /* at most twice the size */
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-string.c:181: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).
	srclen = strlen(src);
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd-string.c:337:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		cp = user = xmalloc(strlen(s));
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd.c:222: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).
		arglen = strlen(argv[i]) + 1;
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd.c:247: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).
		arglen = strlen(buf) + 1;
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd.c:298: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/tmate-ssh-server-2.3.0-49-g97d20249/cmd.c:334: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((*entryp)->name, argv[0], strlen(argv[0])) != 0)
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd.c:372: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((*entryp)->name, argv[0], strlen(argv[0])) != 0)
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd.c:379:4:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	s[strlen(s) - 2] = '\0';
data/tmate-ssh-server-2.3.0-49-g97d20249/cmd.c:675: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(s);
data/tmate-ssh-server-2.3.0-49-g97d20249/colour.c:416: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).
	if (*s == '#' && strlen(s) == 7) {
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/closefrom.c:33: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).
# define NAMLEN(dirent) strlen((dirent)->d_name)
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/fgetln.c:45:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((c = getc(fp)) != EOF) {
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/forkpty-aix.c:57:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (read(pipe_fd[0], &dummy, 1) == -1) {
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/fparseln.c:180:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(buf);
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/setenv.c:38: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).
	namelen = strlen(name);
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/strcasestr.c:50: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(find);
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/strlcat.c:46:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		return(dlen + strlen(s));
data/tmate-ssh-server-2.3.0-49-g97d20249/compat/vis.c:215: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).
	buf = calloc(4, strlen(src) + 1);
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:816: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).
		fromlen = strlen(from);
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:817: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).
		tolen = strlen(to);
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:819: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).
		newlen = strlen(value) + 1;
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:854: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).
	valuelen = strlen(value);
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:885: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).
	tmplen = strlen(fmt);
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:945: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).
			outlen = strlen(out);
data/tmate-ssh-server-2.3.0-49-g97d20249/format.c:999:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			n = strlen(s);
data/tmate-ssh-server-2.3.0-49-g97d20249/grid.c:662: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).
			codelen = strlen(code);
data/tmate-ssh-server-2.3.0-49-g97d20249/input-keys.c:200: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).
			bufferevent_write(wp->event, out, strlen(out));
data/tmate-ssh-server-2.3.0-49-g97d20249/input-keys.c:226: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).
	dlen = strlen(ike->data);
data/tmate-ssh-server-2.3.0-49-g97d20249/input.c:972: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).
	bufferevent_write(ictx->wp->event, reply, strlen(reply));
data/tmate-ssh-server-2.3.0-49-g97d20249/key-string.c:186:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strlen(string) != ud.size)
data/tmate-ssh-server-2.3.0-49-g97d20249/layout-custom.c:109: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).
		buf[strlen(buf) - 1] = brackets[0];
data/tmate-ssh-server-2.3.0-49-g97d20249/layout-set.c:56:42:  [1] (buffer) strlen:
  Does not handle 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(layout_sets[i].name, name, strlen(name)) == 0) {
data/tmate-ssh-server-2.3.0-49-g97d20249/names.c:162: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).
		ptr = name + strlen(name) - 1;
data/tmate-ssh-server-2.3.0-49-g97d20249/options-table.c:974: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).
		if (strncmp(oe_loop->name, optstr, strlen(optstr)) != 0)
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-aix.c:51:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bytes = read(f, &p, sizeof(p));
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-aix.c:84: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).
		if ((len = strlen(target)) > 1 && target[len - 1] == '/')
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-cygwin.c:50:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((ch = fgetc(f)) != EOF) {
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-linux.c:51:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((ch = fgetc(f)) != EOF) {
data/tmate-ssh-server-2.3.0-49-g97d20249/osdep-sunos.c:56:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bytes = read(f, &p, sizeof(p));
data/tmate-ssh-server-2.3.0-49-g97d20249/proc.c:167: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).
	return (proc_send(peer, type, -1, s, strlen(s) + 1));
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-redraw.c:304: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).
		msglen = strlen(msg);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-write.c:85: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).
	msg2 = xmalloc(strlen(msg) + 1);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-write.c:129: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).
			left = strlen(ptr);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-write.c:190: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).
			left = strlen(ptr);
data/tmate-ssh-server-2.3.0-49-g97d20249/screen-write.c:266: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).
			left = strlen(ptr);
data/tmate-ssh-server-2.3.0-49-g97d20249/server-fn.c:184: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(cmd) + 1 > MAX_IMSGSIZE - IMSG_HEADER_SIZE)
data/tmate-ssh-server-2.3.0-49-g97d20249/server.c:122:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	mask = umask(S_IXUSR|S_IXGRP|S_IRWXO);
data/tmate-ssh-server-2.3.0-49-g97d20249/server.c:125:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(mask);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:274: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(options_get_string(oo, "window-status-separator"));
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:686: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).
	c->prompt_index = strlen(c->prompt_buffer);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:746: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).
	c->prompt_index = strlen(c->prompt_buffer);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:830:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size = strlen(c->prompt_buffer);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:905: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).
		size += strlen(s);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:909: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).
		memmove(first + strlen(s), first, n);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:910: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).
		memcpy(first, s, strlen(s));
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:912: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).
		c->prompt_index = (first - c->prompt_buffer) + strlen(s);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1064: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).
		c->prompt_index = strlen(c->prompt_buffer);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1073: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).
		c->prompt_index = strlen(c->prompt_buffer);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1217: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((*cmdent)->name, s, strlen(s)) == 0) {
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1223: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).
		if (strncmp(oe->name, s, strlen(s)) == 0) {
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1229: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).
		if (strncmp(*layout, s, strlen(s)) == 0) {
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1247: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).
		j = strlen(list[i]);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1248: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).
		if (j > strlen(out))
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1249:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			j = strlen(out);
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1287: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).
	if (copy[strlen(copy) - 1] == ':')
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1288:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		copy[strlen(copy) - 1] = '\0';
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1294: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(s_loop->name, s, strlen(s)) == 0) {
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1315:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strncmp(tmp, s, strlen(s)) == 0){
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1324:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strncmp(tmp, s, strlen(s)) == 0) {
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1338: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 (strncmp(tmp, s, strlen(s)) == 0) {
data/tmate-ssh-server-2.3.0-49-g97d20249/status.c:1347: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 (strncmp(tmp, s, strlen(s)) == 0) {
data/tmate-ssh-server-2.3.0-49-g97d20249/style.c:40: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).
	if (strchr(delimiters, in[strlen(in) - 1]) != NULL)
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-auth-keys.c:143:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		size_t ret = read(fd, buf+i, len-i);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-auth-keys.c:193: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).
		.len = IMSG_HEADER_SIZE + (pubkey ? strlen(pubkey)+1 : 0),
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-auth-keys.c:203: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 (write_all(sock_fd, pubkey, strlen(pubkey)+1) < 0)
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-debug.c:60: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).
	line[strlen(line)-1] = 0; /* remove \n */
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-msgpack.c:33: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/tmate-ssh-server-2.3.0-49-g97d20249/tmate-rand.c:14:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(dev_urandom_fd, buffer, len) != len)
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-client-pty.c:62:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		len = read(session->pty, buf, sizeof(buf));
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-client-pty.c:131: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).
	ssh_channel_write(ssh_client->channel, str, strlen(str));
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-client-pty.c:148:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(token);
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-exec.c:10: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).
	ssh_channel_write(client->channel, message, strlen(message));
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-server.c:310:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(fd, &dst[i], 1) <= 0)
data/tmate-ssh-server-2.3.0-49-g97d20249/tmate-ssh-server.c:331:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t ret = read(fd, header, sizeof(SIGNATURE)-1);
data/tmate-ssh-server-2.3.0-49-g97d20249/tty-keys.c:327: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 ((tk = tty_keys_find(tty, s, strlen(s), &size)) == NULL) {
data/tmate-ssh-server-2.3.0-49-g97d20249/tty-term.c:335: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).
			} else if (entstr[strlen(entstr) - 1] == '@') {
data/tmate-ssh-server-2.3.0-49-g97d20249/tty-term.c:336: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).
				entstr[strlen(entstr) - 1] = '\0';
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:428: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).
	slen = strlen(s);
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:438:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(100);
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:484: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).
	bufferevent_write(tty->event, s, strlen(s));
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:487:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		write(tty_log_fd, s, strlen(s));
data/tmate-ssh-server-2.3.0-49-g97d20249/tty.c:499: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).
			bufferevent_write(tty->event, acs, strlen(acs));
data/tmate-ssh-server-2.3.0-49-g97d20249/utf8.c:394: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).
	slen = strlen(s);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-choose.c:324: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).
	input_len = strlen(data->input_str) + 2;
data/tmate-ssh-server-2.3.0-49-g97d20249/window-choose.c:542: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).
			input_len = strlen(data->input_str);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-choose.c:699: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).
		input_len = strlen(data->input_str);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-clock.c:226:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (screen_size_x(s) < 6 * strlen(tim) || screen_size_y(s) < 6) {
data/tmate-ssh-server-2.3.0-49-g97d20249/window-clock.c:227: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).
		if (screen_size_x(s) >= strlen(tim) && screen_size_y(s) != 0) {
data/tmate-ssh-server-2.3.0-49-g97d20249/window-clock.c:228: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).
			x = (screen_size_x(s) / 2) - (strlen(tim) / 2);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-clock.c:241: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).
	x = (screen_size_x(s) / 2) - 3 * strlen(tim);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.c:747: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).
		inputlen = strlen(data->inputstr);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.c:763: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).
		inputlen = strlen(data->inputstr);
data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.c:814: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).
		inputlen = strlen(data->inputstr) + 2;
data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.c:1520:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				if (s != NULL && strlen(s) <= sizeof ud.data) {
data/tmate-ssh-server-2.3.0-49-g97d20249/window-copy.c:1521: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).
					ud.size = strlen(s);

ANALYSIS SUMMARY:

Hits = 425
Lines analyzed = 52989 in approximately 1.26 seconds (42137 lines/second)
Physical Source Lines of Code (SLOC) = 39210
Hits@level = [0]  29 [1] 129 [2] 246 [3]  19 [4]  22 [5]   9
Hits@level+ = [0+] 454 [1+] 425 [2+] 296 [3+]  50 [4+]  31 [5+]   9
Hits/KSLOC@level+ = [0+] 11.5787 [1+] 10.8391 [2+] 7.54909 [3+] 1.27518 [4+] 0.790615 [5+] 0.229533
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.