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/tmux-3.2~rc3/compat/asprintf.c Examining data/tmux-3.2~rc3/compat/base64.c Examining data/tmux-3.2~rc3/compat/cfmakeraw.c Examining data/tmux-3.2~rc3/compat/closefrom.c Examining data/tmux-3.2~rc3/compat/daemon-darwin.c Examining data/tmux-3.2~rc3/compat/daemon.c Examining data/tmux-3.2~rc3/compat/err.c Examining data/tmux-3.2~rc3/compat/explicit_bzero.c Examining data/tmux-3.2~rc3/compat/fdforkpty.c Examining data/tmux-3.2~rc3/compat/fgetln.c Examining data/tmux-3.2~rc3/compat/freezero.c Examining data/tmux-3.2~rc3/compat/getdtablecount.c Examining data/tmux-3.2~rc3/compat/getdtablesize.c Examining data/tmux-3.2~rc3/compat/getline.c Examining data/tmux-3.2~rc3/compat/getopt.c Examining data/tmux-3.2~rc3/compat/getprogname.c Examining data/tmux-3.2~rc3/compat/imsg-buffer.c Examining data/tmux-3.2~rc3/compat/imsg.c Examining data/tmux-3.2~rc3/compat/memmem.c Examining data/tmux-3.2~rc3/compat/reallocarray.c Examining data/tmux-3.2~rc3/compat/recallocarray.c Examining data/tmux-3.2~rc3/compat/setenv.c Examining data/tmux-3.2~rc3/compat/unvis.c Examining data/tmux-3.2~rc3/compat/setproctitle.c Examining data/tmux-3.2~rc3/compat/strcasestr.c Examining data/tmux-3.2~rc3/compat/strlcat.c Examining data/tmux-3.2~rc3/compat/strlcpy.c Examining data/tmux-3.2~rc3/compat/strndup.c Examining data/tmux-3.2~rc3/compat/strnlen.c Examining data/tmux-3.2~rc3/compat/strsep.c Examining data/tmux-3.2~rc3/compat/strtonum.c Examining data/tmux-3.2~rc3/compat/vis.c Examining data/tmux-3.2~rc3/compat/bitstring.h Examining data/tmux-3.2~rc3/compat/forkpty-aix.c Examining data/tmux-3.2~rc3/compat/forkpty-hpux.c Examining data/tmux-3.2~rc3/compat/forkpty-sunos.c Examining data/tmux-3.2~rc3/compat/imsg.h Examining data/tmux-3.2~rc3/compat/queue.h Examining data/tmux-3.2~rc3/compat/tree.h Examining data/tmux-3.2~rc3/compat/utf8proc.c Examining data/tmux-3.2~rc3/compat/vis.h Examining data/tmux-3.2~rc3/cmd-parse.c Examining data/tmux-3.2~rc3/alerts.c Examining data/tmux-3.2~rc3/arguments.c Examining data/tmux-3.2~rc3/attributes.c Examining data/tmux-3.2~rc3/cfg.c Examining data/tmux-3.2~rc3/client.c Examining data/tmux-3.2~rc3/cmd-attach-session.c Examining data/tmux-3.2~rc3/cmd-bind-key.c Examining data/tmux-3.2~rc3/cmd-break-pane.c Examining data/tmux-3.2~rc3/cmd-capture-pane.c Examining data/tmux-3.2~rc3/cmd-choose-tree.c Examining data/tmux-3.2~rc3/cmd-command-prompt.c Examining data/tmux-3.2~rc3/cmd-confirm-before.c Examining data/tmux-3.2~rc3/cmd-copy-mode.c Examining data/tmux-3.2~rc3/cmd-detach-client.c Examining data/tmux-3.2~rc3/cmd-display-menu.c Examining data/tmux-3.2~rc3/cmd-display-message.c Examining data/tmux-3.2~rc3/cmd-display-panes.c Examining data/tmux-3.2~rc3/cmd-find-window.c Examining data/tmux-3.2~rc3/cmd-find.c Examining data/tmux-3.2~rc3/cmd-if-shell.c Examining data/tmux-3.2~rc3/cmd-join-pane.c Examining data/tmux-3.2~rc3/cmd-kill-pane.c Examining data/tmux-3.2~rc3/cmd-kill-server.c Examining data/tmux-3.2~rc3/cmd-kill-session.c Examining data/tmux-3.2~rc3/cmd-kill-window.c Examining data/tmux-3.2~rc3/cmd-list-buffers.c Examining data/tmux-3.2~rc3/cmd-list-clients.c Examining data/tmux-3.2~rc3/cmd-list-keys.c Examining data/tmux-3.2~rc3/cmd-list-panes.c Examining data/tmux-3.2~rc3/cmd-list-sessions.c Examining data/tmux-3.2~rc3/cmd-list-windows.c Examining data/tmux-3.2~rc3/cmd-load-buffer.c Examining data/tmux-3.2~rc3/cmd-lock-server.c Examining data/tmux-3.2~rc3/cmd-move-window.c Examining data/tmux-3.2~rc3/cmd-new-session.c Examining data/tmux-3.2~rc3/cmd-new-window.c Examining data/tmux-3.2~rc3/cmd-paste-buffer.c Examining data/tmux-3.2~rc3/cmd-pipe-pane.c Examining data/tmux-3.2~rc3/cmd-queue.c Examining data/tmux-3.2~rc3/cmd-refresh-client.c Examining data/tmux-3.2~rc3/cmd-rename-session.c Examining data/tmux-3.2~rc3/cmd-rename-window.c Examining data/tmux-3.2~rc3/cmd-resize-pane.c Examining data/tmux-3.2~rc3/cmd-resize-window.c Examining data/tmux-3.2~rc3/cmd-respawn-pane.c Examining data/tmux-3.2~rc3/cmd-respawn-window.c Examining data/tmux-3.2~rc3/cmd-rotate-window.c Examining data/tmux-3.2~rc3/cmd-run-shell.c Examining data/tmux-3.2~rc3/cmd.c Examining data/tmux-3.2~rc3/cmd-save-buffer.c Examining data/tmux-3.2~rc3/cmd-select-layout.c Examining data/tmux-3.2~rc3/cmd-select-pane.c Examining data/tmux-3.2~rc3/cmd-select-window.c Examining data/tmux-3.2~rc3/cmd-send-keys.c Examining data/tmux-3.2~rc3/cmd-set-buffer.c Examining data/tmux-3.2~rc3/cmd-set-environment.c Examining data/tmux-3.2~rc3/cmd-set-option.c Examining data/tmux-3.2~rc3/cmd-show-environment.c Examining data/tmux-3.2~rc3/cmd-show-messages.c Examining data/tmux-3.2~rc3/cmd-show-options.c Examining data/tmux-3.2~rc3/cmd-source-file.c Examining data/tmux-3.2~rc3/cmd-split-window.c Examining data/tmux-3.2~rc3/cmd-swap-pane.c Examining data/tmux-3.2~rc3/cmd-swap-window.c Examining data/tmux-3.2~rc3/cmd-switch-client.c Examining data/tmux-3.2~rc3/cmd-unbind-key.c Examining data/tmux-3.2~rc3/cmd-wait-for.c Examining data/tmux-3.2~rc3/colour.c Examining data/tmux-3.2~rc3/control-notify.c Examining data/tmux-3.2~rc3/control.c Examining data/tmux-3.2~rc3/environ.c Examining data/tmux-3.2~rc3/file.c Examining data/tmux-3.2~rc3/format.c Examining data/tmux-3.2~rc3/format-draw.c Examining data/tmux-3.2~rc3/grid-view.c Examining data/tmux-3.2~rc3/grid.c Examining data/tmux-3.2~rc3/input-keys.c Examining data/tmux-3.2~rc3/input.c Examining data/tmux-3.2~rc3/job.c Examining data/tmux-3.2~rc3/key-bindings.c Examining data/tmux-3.2~rc3/key-string.c Examining data/tmux-3.2~rc3/layout-custom.c Examining data/tmux-3.2~rc3/layout-set.c Examining data/tmux-3.2~rc3/layout.c Examining data/tmux-3.2~rc3/log.c Examining data/tmux-3.2~rc3/menu.c Examining data/tmux-3.2~rc3/mode-tree.c Examining data/tmux-3.2~rc3/names.c Examining data/tmux-3.2~rc3/notify.c Examining data/tmux-3.2~rc3/options-table.c Examining data/tmux-3.2~rc3/options.c Examining data/tmux-3.2~rc3/paste.c Examining data/tmux-3.2~rc3/popup.c Examining data/tmux-3.2~rc3/proc.c Examining data/tmux-3.2~rc3/regsub.c Examining data/tmux-3.2~rc3/resize.c Examining data/tmux-3.2~rc3/screen-redraw.c Examining data/tmux-3.2~rc3/screen-write.c Examining data/tmux-3.2~rc3/screen.c Examining data/tmux-3.2~rc3/server-client.c Examining data/tmux-3.2~rc3/server-fn.c Examining data/tmux-3.2~rc3/server.c Examining data/tmux-3.2~rc3/session.c Examining data/tmux-3.2~rc3/spawn.c Examining data/tmux-3.2~rc3/status.c Examining data/tmux-3.2~rc3/style.c Examining data/tmux-3.2~rc3/tmux.c Examining data/tmux-3.2~rc3/tmux.h Examining data/tmux-3.2~rc3/tty-acs.c Examining data/tmux-3.2~rc3/tty-features.c Examining data/tmux-3.2~rc3/tty-keys.c Examining data/tmux-3.2~rc3/tty-term.c Examining data/tmux-3.2~rc3/tty.c Examining data/tmux-3.2~rc3/utf8.c Examining data/tmux-3.2~rc3/window-buffer.c Examining data/tmux-3.2~rc3/window-client.c Examining data/tmux-3.2~rc3/window-clock.c Examining data/tmux-3.2~rc3/window-copy.c Examining data/tmux-3.2~rc3/window-customize.c Examining data/tmux-3.2~rc3/window-tree.c Examining data/tmux-3.2~rc3/window.c Examining data/tmux-3.2~rc3/xmalloc.c Examining data/tmux-3.2~rc3/xmalloc.h Examining data/tmux-3.2~rc3/osdep-aix.c Examining data/tmux-3.2~rc3/osdep-cygwin.c Examining data/tmux-3.2~rc3/osdep-darwin.c Examining data/tmux-3.2~rc3/osdep-dragonfly.c Examining data/tmux-3.2~rc3/osdep-freebsd.c Examining data/tmux-3.2~rc3/osdep-hpux.c Examining data/tmux-3.2~rc3/osdep-linux.c Examining data/tmux-3.2~rc3/osdep-netbsd.c Examining data/tmux-3.2~rc3/osdep-openbsd.c Examining data/tmux-3.2~rc3/osdep-sunos.c Examining data/tmux-3.2~rc3/osdep-unknown.c Examining data/tmux-3.2~rc3/compat.h FINAL RESULTS: data/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/osdep-netbsd.c:158: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, sizeof(target) - 1); data/tmux-3.2~rc3/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/tmux-3.2~rc3/server.c:341: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/tmux-3.2~rc3/client.c:758: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/tmux-3.2~rc3/client.c:1019: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/tmux-3.2~rc3/cmd-pipe-pane.c:154: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/tmux-3.2~rc3/compat/asprintf.c:48: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/tmux-3.2~rc3/compat/asprintf.c:52: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/tmux-3.2~rc3/compat/err.c:37:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/tmux-3.2~rc3/compat/err.c:55:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/tmux-3.2~rc3/compat/err.c:72:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/tmux-3.2~rc3/compat/err.c:89:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/tmux-3.2~rc3/compat/setproctitle.c:36: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(title, sizeof title, fmt, ap); data/tmux-3.2~rc3/job.c:142: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/tmux-3.2~rc3/server-client.c:2192: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/tmux-3.2~rc3/spawn.c:417:3: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(argvp[0], argvp); data/tmux-3.2~rc3/spawn.c:432: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(new_wp->shell, argv0, "-c", tmp, (char *)NULL); data/tmux-3.2~rc3/spawn.c:439: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(new_wp->shell, argv0, (char *)NULL); data/tmux-3.2~rc3/tmux.c:87: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/tmux-3.2~rc3/tmux.h:95: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/tmux-3.2~rc3/xmalloc.c:155: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/tmux-3.2~rc3/xmalloc.h:34: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/tmux-3.2~rc3/xmalloc.h:39: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/tmux-3.2~rc3/arguments.c:79: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/tmux-3.2~rc3/client.c:451: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/tmux-3.2~rc3/cmd-parse.c:1422:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((yys = getenv("YYDEBUG"))) data/tmux-3.2~rc3/compat.h:431: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/tmux-3.2~rc3/tmux.c:69: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/tmux-3.2~rc3/tmux.c:159:7: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (realpath(expanded, resolved) == NULL) { data/tmux-3.2~rc3/tmux.c:276:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((pwd = getenv("PWD")) == NULL || *pwd == '\0') data/tmux-3.2~rc3/tmux.c:283: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(pwd, resolved1) == NULL) data/tmux-3.2~rc3/tmux.c:285: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(cwd, resolved2) == NULL) data/tmux-3.2~rc3/tmux.c:301: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/tmux-3.2~rc3/tmux.c:344: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:CDdf:lL:qS:T:uUvV")) != -1) { data/tmux-3.2~rc3/tmux.c:414: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/tmux-3.2~rc3/tmux.c:417: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/tmux-3.2~rc3/tmux.c:419: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/tmux-3.2~rc3/tmux.c:421: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/tmux-3.2~rc3/tmux.c:455: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/tmux-3.2~rc3/tmux.c:455: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/tmux-3.2~rc3/tmux.c:473: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/tmux-3.2~rc3/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[512]; data/tmux-3.2~rc3/cfg.c:118: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/tmux-3.2~rc3/client.c:84: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/tmux-3.2~rc3/client.c:185: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/tmux-3.2~rc3/client.c:550: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). cf->fd = open(path, msg->flags|flags, 0644); data/tmux-3.2~rc3/client.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(msg + 1, bdata, bsize); data/tmux-3.2~rc3/client.c:705: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). cf->fd = open(path, flags); data/tmux-3.2~rc3/client.c:832: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(&retval, data, sizeof retval); data/tmux-3.2~rc3/client.c:841: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(client_exitmessage, data, datalen); data/tmux-3.2~rc3/client.c:901: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(&client_flags, data, sizeof client_flags); data/tmux-3.2~rc3/client.c:955: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(&client_flags, data, sizeof client_flags); data/tmux-3.2~rc3/cmd-capture-pane.c:69: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/tmux-3.2~rc3/cmd-capture-pane.c:79: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/tmux-3.2~rc3/cmd-display-panes.c:61: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], lbuf[16], rbuf[16], *ptr; data/tmux-3.2~rc3/cmd-display-panes.c:121: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(&fgc, &grid_default_cell, sizeof fgc); data/tmux-3.2~rc3/cmd-display-panes.c:122: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(&bgc, &grid_default_cell, sizeof bgc); data/tmux-3.2~rc3/cmd-load-buffer.c:72: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(copy, bdata, bsize); data/tmux-3.2~rc3/cmd-parse.c:809: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, add, addlen); data/tmux-3.2~rc3/cmd-parse.c:1072: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[9], m[MB_LEN_MAX]; data/tmux-3.2~rc3/cmd-parse.c:1171: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[1024]; data/tmux-3.2~rc3/cmd-parse.c:1223: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[1024]; data/tmux-3.2~rc3/cmd-pipe-pane.c:133: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/tmux-3.2~rc3/cmd-pipe-pane.c:162: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(wpo, &wp->offset, sizeof *wpo); data/tmux-3.2~rc3/cmd-queue.c:96: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/tmux-3.2~rc3/cmd-queue.c:216: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(&state->event, event, sizeof state->event); data/tmux-3.2~rc3/cmd-queue.c:350: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, tmp[32], flag, *arguments; data/tmux-3.2~rc3/cmd-run-shell.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(line, EVBUFFER_DATA(event->input), size); data/tmux-3.2~rc3/cmd-set-buffer.c:110: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/tmux-3.2~rc3/cmd-set-buffer.c:114: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/tmux-3.2~rc3/cmd.c:452: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[8192]; data/tmux-3.2~rc3/colour.c:111: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/tmux-3.2~rc3/colour.c:317: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 table[256] = { data/tmux-3.2~rc3/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/tmux-3.2~rc3/compat/daemon.c:63: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/tmux-3.2~rc3/compat/forkpty-aix.c:42: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/tmux-3.2~rc3/compat/forkpty-aix.c:51: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/tmux-3.2~rc3/compat/forkpty-aix.c:67: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/tmux-3.2~rc3/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_TTY, O_RDWR|O_NOCTTY); data/tmux-3.2~rc3/compat/forkpty-aix.c:80: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/tmux-3.2~rc3/compat/forkpty-aix.c:85: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/tmux-3.2~rc3/compat/forkpty-hpux.c:37: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/tmux-3.2~rc3/compat/forkpty-hpux.c:48: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/tmux-3.2~rc3/compat/forkpty-sunos.c:39: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/tmux-3.2~rc3/compat/forkpty-sunos.c:50: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/tmux-3.2~rc3/compat/getdtablecount.c:31: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/tmux-3.2~rc3/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/tmux-3.2~rc3/compat/imsg-buffer.c:235: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/tmux-3.2~rc3/compat/imsg.c:53: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/tmux-3.2~rc3/compat/imsg.c:153: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/tmux-3.2~rc3/compat/imsg.h:47:11: [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. unsigned char buf[IBUF_READ_SIZE]; data/tmux-3.2~rc3/compat/recallocarray.c:73: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(newptr, ptr, oldsize); data/tmux-3.2~rc3/compat/recallocarray.c:76: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(newptr, ptr, newsize); data/tmux-3.2~rc3/compat/setproctitle.c:31: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 title[16], name[16], *cp; data/tmux-3.2~rc3/compat/strndup.c:36:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(copy, str, len); data/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/control.c:259: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(&cp->offset, &wp->offset, sizeof cp->offset); data/tmux-3.2~rc3/control.c:260:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&cp->queued, &wp->offset, sizeof cp->queued); data/tmux-3.2~rc3/control.c:344: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(&cp->offset, &wp->offset, sizeof cp->offset); data/tmux-3.2~rc3/control.c:345: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(&cp->queued, &wp->offset, sizeof cp->queued); data/tmux-3.2~rc3/control.c:368: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(&cp->offset, &wp->offset, sizeof cp->offset); data/tmux-3.2~rc3/control.c:369: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(&cp->queued, &wp->offset, sizeof cp->queued); data/tmux-3.2~rc3/file.c:259:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(cf->path, mode); data/tmux-3.2~rc3/file.c:285: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(msg + 1, cf->path, msglen - sizeof *msg); data/tmux-3.2~rc3/file.c:306:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFSIZ]; data/tmux-3.2~rc3/file.c:326:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(cf->path, "rb"); data/tmux-3.2~rc3/file.c:357: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(msg + 1, cf->path, msglen - sizeof *msg); data/tmux-3.2~rc3/file.c:399: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 + 1, EVBUFFER_DATA(cf->buffer), sent); data/tmux-3.2~rc3/format-draw.c:527: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(¤t_default, base, sizeof current_default); data/tmux-3.2~rc3/format-draw.c:603: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(¤t_default, &saved_sy.gc, data/tmux-3.2~rc3/format-draw.c:607: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(¤t_default, base, sizeof current_default); data/tmux-3.2~rc3/format-draw.c:734: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/tmux-3.2~rc3/format-draw.c:842: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, cp, end + 1 - cp); data/tmux-3.2~rc3/format-draw.c:850: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(out, ud.data, ud.size); data/tmux-3.2~rc3/format-draw.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(out, cp, end + 1 - cp); data/tmux-3.2~rc3/format-draw.c:899: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(out, ud.data, ud.size); data/tmux-3.2~rc3/format.c: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 modifier[3]; data/tmux-3.2~rc3/format.c:311: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(evb), len); data/tmux-3.2~rc3/format.c:452: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/tmux-3.2~rc3/format.c:463: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/tmux-3.2~rc3/format.c:519: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[1024], tmp[16]; data/tmux-3.2~rc3/format.c:549: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 result[1024], tmp[16]; data/tmux-3.2~rc3/format.c:1087: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(&ud[size++], &gc.data, sizeof *ud); data/tmux-3.2~rc3/format.c:1140: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(&ud[size++], &gc.data, sizeof *ud); data/tmux-3.2~rc3/format.c:1215: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(&ft->m, m, sizeof ft->m); data/tmux-3.2~rc3/format.c:1224: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/tmux-3.2~rc3/format.c:1288: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[64]; data/tmux-3.2~rc3/format.c:1402: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[6]; data/tmux-3.2~rc3/format.c:1643: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(fm->modifier, c, n); data/tmux-3.2~rc3/format.c:2473: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/tmux-3.2~rc3/format.c:2503: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 expanded[8192]; data/tmux-3.2~rc3/format.c:2574: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/tmux-3.2~rc3/grid.c:169: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_extddata[idx], gee, sizeof *gee); data/tmux-3.2~rc3/grid.c:201: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(gce, &grid_cleared_entry, sizeof *gce); data/tmux-3.2~rc3/grid.c:443: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/tmux-3.2~rc3/grid.c:505: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/tmux-3.2~rc3/grid.c:536: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/tmux-3.2~rc3/grid.c:844: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/tmux-3.2~rc3/grid.c:964: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/tmux-3.2~rc3/grid.c:970: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/tmux-3.2~rc3/grid.c:990: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/tmux-3.2~rc3/grid.c:1007: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/tmux-3.2~rc3/grid.c:1010: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/tmux-3.2~rc3/grid.c:1044: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/tmux-3.2~rc3/grid.c:1048: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/tmux-3.2~rc3/grid.c:1057: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/tmux-3.2~rc3/grid.c:1095: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/tmux-3.2~rc3/grid.c:1261: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(first, gl, sizeof *first); data/tmux-3.2~rc3/input-keys.c:437: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], modifier; data/tmux-3.2~rc3/input-keys.c:575: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[40]; data/tmux-3.2~rc3/input.c:760: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/tmux-3.2~rc3/input.c:764: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/tmux-3.2~rc3/input.c:776: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/tmux-3.2~rc3/input.c:788: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, &ictx->old_cell, sizeof ictx->cell); data/tmux-3.2~rc3/input.c:2058: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/tmux-3.2~rc3/input.c:2086: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/tmux-3.2~rc3/job.c:132: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). nullfd = open(_PATH_DEVNULL, O_RDWR, 0); data/tmux-3.2~rc3/key-string.c:173: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 m[MB_LEN_MAX + 1]; data/tmux-3.2~rc3/key-string.c:263: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[64]; data/tmux-3.2~rc3/key-string.c:264: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/tmux-3.2~rc3/key-string.c:370: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(out + off, ud.data, ud.size); data/tmux-3.2~rc3/layout-custom.c:63: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[8192], *out; data/tmux-3.2~rc3/layout-custom.c:78: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/tmux-3.2~rc3/log.c:67:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). log_file = fopen(path, "a"); data/tmux-3.2~rc3/mode-tree.c:599: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 *text, *start, key[7]; data/tmux-3.2~rc3/mode-tree.c:607: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(&gc0, &grid_default_cell, sizeof gc0); data/tmux-3.2~rc3/mode-tree.c:608: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/tmux-3.2~rc3/names.c:89: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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/osdep-darwin.c:74: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/tmux-3.2~rc3/osdep-freebsd.c:140: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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/osdep-netbsd.c:135: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[PATH_MAX + 1]; data/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/popup.c:552: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(pe->path, "r"); data/tmux-3.2~rc3/popup.c:588:7: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). fd = mkstemp(path); data/tmux-3.2~rc3/regsub.c:32: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, text + start, add); data/tmux-3.2~rc3/screen-redraw.c:429:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&old, &wp->status_screen, sizeof old); data/tmux-3.2~rc3/screen-redraw.c:699: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/tmux-3.2~rc3/screen-redraw.c:704: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, tmp, sizeof gc); data/tmux-3.2~rc3/screen-write.c:158: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(&ttyctx->defaults, &grid_default_cell, data/tmux-3.2~rc3/screen-write.c:314: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, gcp, sizeof gc); data/tmux-3.2~rc3/screen-write.c:372: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, gcp, sizeof gc); data/tmux-3.2~rc3/screen-write.c:485: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, gcp, sizeof gc); data/tmux-3.2~rc3/screen-write.c:576: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/tmux-3.2~rc3/screen-write.c:598: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/tmux-3.2~rc3/screen-write.c:626: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(&default_gc, &grid_default_cell, sizeof default_gc); data/tmux-3.2~rc3/screen-write.c:669: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/tmux-3.2~rc3/screen-write.c:898: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/tmux-3.2~rc3/screen-write.c:1679: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(&ci->gc, gc, sizeof ci->gc); data/tmux-3.2~rc3/screen-write.c:1792: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, gc, sizeof tmp_gc); data/tmux-3.2~rc3/screen-write.c:1796: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, gc, sizeof tmp_gc); data/tmux-3.2~rc3/screen-write.c:1870: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/tmux-3.2~rc3/screen.c:371: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(&s->sel->cell, gc, sizeof s->sel->cell); data/tmux-3.2~rc3/screen.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(dst, &s->sel->cell, sizeof *dst); data/tmux-3.2~rc3/screen.c:564: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(&s->saved_cell, gc, sizeof s->saved_cell); data/tmux-3.2~rc3/screen.c:590: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, &s->saved_cell, sizeof *gc); data/tmux-3.2~rc3/server-client.c:218: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/tmux-3.2~rc3/server-client.c:432: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(msg, cmd, cmdsize); data/tmux-3.2~rc3/server-client.c:433: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(msg + cmdsize, shell, shellsize); data/tmux-3.2~rc3/server-client.c:534: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->click_event, m, sizeof c->click_event); data/tmux-3.2~rc3/server-client.c:1743: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(&event->m, &c->click_event, sizeof event->m); data/tmux-3.2~rc3/server-client.c:1786: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, &c->retval, sizeof c->retval); data/tmux-3.2~rc3/server-client.c:1788: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(data + sizeof c->retval, c->exit_message, msize); data/tmux-3.2~rc3/server-client.c:2087: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/tmux-3.2~rc3/server-client.c:2154: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(&feat, data, sizeof feat); data/tmux-3.2~rc3/server-client.c:2162: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/tmux-3.2~rc3/server-client.c:2169: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(&longflags, data, sizeof longflags); data/tmux-3.2~rc3/server-client.c:2222: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/tmux-3.2~rc3/server-client.c:2241: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/tmux-3.2~rc3/server-client.c:2429: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/tmux-3.2~rc3/server-client.c:2430: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/tmux-3.2~rc3/server-fn.c:314: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[26]; data/tmux-3.2~rc3/server-fn.c:341: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/tmux-3.2~rc3/session.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(s->tio, tio, sizeof *s->tio); data/tmux-3.2~rc3/session.c:271: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/tmux-3.2~rc3/session.c:275: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/tmux-3.2~rc3/session.c:655: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/tmux-3.2~rc3/session.c:674: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/tmux-3.2~rc3/session.c:702: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/tmux-3.2~rc3/session.c:723: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/tmux-3.2~rc3/spawn.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 tmp[128]; data/tmux-3.2~rc3/spawn.c:392: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(now.c_cc, s->tio->c_cc, sizeof now.c_cc); data/tmux-3.2~rc3/status.c:90: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/tmux-3.2~rc3/status.c:108: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/tmux-3.2~rc3/status.c:130: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/tmux-3.2~rc3/status.c:366: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(&sl->style, &gc, sizeof sl->style); data/tmux-3.2~rc3/status.c:504: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_screen, sl->active, sizeof old_screen); data/tmux-3.2~rc3/status.c:659: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_screen, sl->active, sizeof old_screen); data/tmux-3.2~rc3/status.c:673: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(&cursorgc, &gc, sizeof cursorgc); data/tmux-3.2~rc3/status.c:931: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->prompt_buffer + c->prompt_index, ud, data/tmux-3.2~rc3/status.c:939: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->prompt_buffer + c->prompt_index, ud, data/tmux-3.2~rc3/status.c:953: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 word[64], *allocated = NULL; data/tmux-3.2~rc3/status.c:983: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(word + used, ud->data, ud->size); data/tmux-3.2~rc3/status.c:1155: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->prompt_saved, c->prompt_buffer + idx, data/tmux-3.2~rc3/status.c:1660: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, *tmp, n[11]; data/tmux-3.2~rc3/style.c:55:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[256], *found; data/tmux-3.2~rc3/style.c:73: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/tmux-3.2~rc3/style.c:131:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). sy->range_argument = atoi(found); data/tmux-3.2~rc3/style.c:192: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/tmux-3.2~rc3/style.c:193:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[16]; data/tmux-3.2~rc3/style.c:297: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/tmux-3.2~rc3/style.c:305: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(sy, &style_default, sizeof *sy); data/tmux-3.2~rc3/style.c:306: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(&sy->gc, gc, sizeof sy->gc); data/tmux-3.2~rc3/style.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(dst, src, sizeof *dst); data/tmux-3.2~rc3/tmux.c:146: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 *copy, *next, *tmp, resolved[PATH_MAX], *expanded; data/tmux-3.2~rc3/tmux.c:257:13: [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[11]; data/tmux-3.2~rc3/tmux.c:270: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 resolved1[PATH_MAX], resolved2[PATH_MAX]; data/tmux-3.2~rc3/tmux.c:271: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 cwd[PATH_MAX]; data/tmux-3.2~rc3/tmux.h:965: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/tmux-3.2~rc3/tmux.h:1258: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/tmux-3.2~rc3/tmux.h:2849: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/tmux-3.2~rc3/tty-features.c:278: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[512]; data/tmux-3.2~rc3/tty-keys.c:485: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 copy[16]; data/tmux-3.2~rc3/tty-keys.c:831: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(&event->m, &m, sizeof event->m); data/tmux-3.2~rc3/tty-keys.c:871: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/tmux-3.2~rc3/tty-keys.c:901: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, buf + 2, end); data/tmux-3.2~rc3/tty-keys.c:1164: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, buf, end); data/tmux-3.2~rc3/tty-keys.c:1194: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], *endptr, p[32] = { 0 }, *cp, *next; data/tmux-3.2~rc3/tty-keys.c:1276: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[128]; data/tmux-3.2~rc3/tty-term.c:296: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[8192]; data/tmux-3.2~rc3/tty-term.c:326: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 value[8192]; data/tmux-3.2~rc3/tty-term.c:722: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/tmux-3.2~rc3/tty-term.c:723: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/tmux-3.2~rc3/tty.c:83: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/tmux-3.2~rc3/tty.c:87: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/tmux-3.2~rc3/tty.c:304: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, &tty->tio, sizeof tio); data/tmux-3.2~rc3/tty.c:745: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[500]; data/tmux-3.2~rc3/tty.c:1139: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/tmux-3.2~rc3/tty.c:1247: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(&new, gc, sizeof new); data/tmux-3.2~rc3/tty.c:1285: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[512]; data/tmux-3.2~rc3/tty.c:1345: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, &grid_default_cell, sizeof last); data/tmux-3.2~rc3/tty.c:1382: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(&last, gcp, sizeof last); data/tmux-3.2~rc3/tty.c:1402: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 + len, gcp->data.data, gcp->data.size); data/tmux-3.2~rc3/tty.c:1977: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/tmux-3.2~rc3/tty.c:1979: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->last_cell, &grid_default_cell, sizeof tty->last_cell); data/tmux-3.2~rc3/tty.c:1985: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/tmux-3.2~rc3/tty.c:1986: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->last_cell, &grid_default_cell, sizeof tty->last_cell); data/tmux-3.2~rc3/tty.c:2263: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/tmux-3.2~rc3/tty.c:2350: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->last_cell, &gc2, sizeof tty->last_cell); data/tmux-3.2~rc3/tty.c:2541: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/tmux-3.2~rc3/tty.c:2573: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/tmux-3.2~rc3/tty.c:2668: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/tmux-3.2~rc3/tty.c:2678: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/tmux-3.2~rc3/tty.c:2711: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/tmux-3.2~rc3/utf8.c:34: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[UTF8_SIZE]; data/tmux-3.2~rc3/utf8.c:78: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(ui.data, data, size); data/tmux-3.2~rc3/utf8.c:116: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(ui->data, data, size); data/tmux-3.2~rc3/utf8.c:177: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(ud->data, ui->data, ud->size); data/tmux-3.2~rc3/utf8.c:197: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, &empty, sizeof *ud); data/tmux-3.2~rc3/utf8.c:207: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/tmux-3.2~rc3/utf8.c:499: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/tmux-3.2~rc3/utf8.c:547: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/tmux-3.2~rc3/utf8.c:570: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 + i, s, slen); data/tmux-3.2~rc3/window-clock.c:53: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/tmux-3.2~rc3/window-clock.c:214: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/tmux-3.2~rc3/window-clock.c:243: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/tmux-3.2~rc3/window-clock.c:256: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/tmux-3.2~rc3/window-copy.c:510: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/tmux-3.2~rc3/window-copy.c:1278: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). char open[] = "{[(", close[] = "}])"; data/tmux-3.2~rc3/window-copy.c:1316: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). start = open[cp - close]; data/tmux-3.2~rc3/window-copy.c:1364: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). char open[] = "{[(", close[] = "}])"; data/tmux-3.2~rc3/window-copy.c:1415: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). cp = strchr(open, found); data/tmux-3.2~rc3/window-copy.c:1444:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). end = close[cp - open]; data/tmux-3.2~rc3/window-copy.c:2619: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, ud.data, ud.size); data/tmux-3.2~rc3/window-copy.c:2701: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 + bx, d, dlen); data/tmux-3.2~rc3/window-copy.c:3235: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 + len, gc.data.data, gc.data.size); data/tmux-3.2~rc3/window-copy.c:3343: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/tmux-3.2~rc3/window-copy.c:3885: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/tmux-3.2~rc3/window-copy.c:3935: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/tmux-3.2~rc3/window-copy.c:3940: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/tmux-3.2~rc3/window-customize.c:667: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 choices[256] = ""; data/tmux-3.2~rc3/window-customize.c:768: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/tmux-3.2~rc3/window-customize.c:888: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->fs, fs, sizeof data->fs); data/tmux-3.2~rc3/window-tree.c:530: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/tmux-3.2~rc3/window-tree.c:663: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/tmux-3.2~rc3/window-tree.c:875: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->fs, fs, sizeof data->fs); data/tmux-3.2~rc3/window.c:816: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 flags[32]; data/tmux-3.2~rc3/window.c:866: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/tmux-3.2~rc3/arguments.c:402: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). size_t valuelen = strlen(value); data/tmux-3.2~rc3/attributes.c:85: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/tmux-3.2~rc3/attributes.c:95:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (end != strlen(table[i].name)) data/tmux-3.2~rc3/client.c:363: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/tmux-3.2~rc3/client.c:453: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/tmux-3.2~rc3/client.c:457: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/tmux-3.2~rc3/client.c:458: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/tmux-3.2~rc3/client.c:471: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/tmux-3.2~rc3/client.c:974: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). strlen(data) + 1 == (size_t)datalen) data/tmux-3.2~rc3/client.c:977:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). client_execshell = xstrdup(data + strlen(data) + 1); data/tmux-3.2~rc3/cmd-capture-pane.c:99: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/tmux-3.2~rc3/cmd-capture-pane.c:179: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/tmux-3.2~rc3/cmd-find.c:282: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/tmux-3.2~rc3/cmd-find.c:468: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/tmux-3.2~rc3/cmd-find.c:961: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). tmp[strlen(tmp) - 1] = '\0'; data/tmux-3.2~rc3/cmd-find.c:1286: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/tmux-3.2~rc3/cmd-list-keys.c:270: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). cplen = strlen(cp) + 1; data/tmux-3.2~rc3/cmd-list-keys.c:280: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). cplen = strlen(cp) + 1; data/tmux-3.2~rc3/cmd-list-keys.c:290: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). cplen = strlen(cp); data/tmux-3.2~rc3/cmd-parse.c:489: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). cmds2 = cmd_parse_do_buffer(alias, strlen(alias), pi, &cause); data/tmux-3.2~rc3/cmd-parse.c:611: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). return (cmd_parse_from_buffer(s, strlen(s), pi)); data/tmux-3.2~rc3/cmd-parse.c:722: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). size = strlen(copy[i]); data/tmux-3.2~rc3/cmd-parse.c:826:8: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = getc(ps->f); data/tmux-3.2~rc3/cmd-parse.c:1213: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). yylex_append(buf, len, value, strlen(value)); data/tmux-3.2~rc3/cmd-parse.c:1256:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). yylex_append(buf, len, home, strlen(home)); data/tmux-3.2~rc3/cmd-paste-buffer.c:79: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/tmux-3.2~rc3/cmd-set-buffer.c:101: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/tmux-3.2~rc3/cmd-show-environment.c:56: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/tmux-3.2~rc3/cmd-split-window.c:77: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). plen = strlen(p); data/tmux-3.2~rc3/cmd.c:288: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/tmux-3.2~rc3/cmd.c:314: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/tmux-3.2~rc3/cmd.c:370: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(s) + 1; data/tmux-3.2~rc3/cmd.c:428: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). wanted = strlen(name); data/tmux-3.2~rc3/cmd.c:463:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(entry->name, name, strlen(name)) != 0) data/tmux-3.2~rc3/cmd.c:484:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(entry->name, name, strlen(name)) != 0) data/tmux-3.2~rc3/cmd.c:491: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/tmux-3.2~rc3/cmd.c:635: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) + 6; data/tmux-3.2~rc3/cmd.c:808:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf = xrealloc(buf, len + (strlen(s) * 3) + 1); data/tmux-3.2~rc3/colour.c:175: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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/compat/forkpty-aix.c:61: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/tmux-3.2~rc3/compat/getline.c:59:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = fgetc(fp); data/tmux-3.2~rc3/compat/setenv.c:40: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/tmux-3.2~rc3/compat/strcasestr.c:52: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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/control.c:398:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bufferevent_write(cs->write_event, s, strlen(s)); data/tmux-3.2~rc3/control.c:602:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bufferevent_write(cs->write_event, cb->line, strlen(cb->line)); data/tmux-3.2~rc3/file.c:276: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). msglen = strlen(cf->path) + 1 + sizeof *msg; data/tmux-3.2~rc3/file.c:349: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). msglen = strlen(cf->path) + 1 + sizeof *msg; data/tmux-3.2~rc3/format-draw.c:509:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t size = strlen(expanded); data/tmux-3.2~rc3/format-draw.c:836: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). out = copy = xmalloc(strlen(expanded) + 1); data/tmux-3.2~rc3/format-draw.c:885: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). out = copy = xmalloc(strlen(expanded) + 1); data/tmux-3.2~rc3/format.c:1386: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). at = out = xmalloc(strlen(s) * 2 + 1); data/tmux-3.2~rc3/format.c:1551: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). cp = out = xmalloc(strlen(s) + 1); data/tmux-3.2~rc3/format.c:1861: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). valuelen += strlen(expanded); data/tmux-3.2~rc3/format.c:1912: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). valuelen += strlen(expanded); data/tmux-3.2~rc3/format.c:1964: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). valuelen += strlen(expanded); data/tmux-3.2~rc3/format.c:2461:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). xasprintf(&new, "%zu", strlen(value)); data/tmux-3.2~rc3/format.c:2468: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/tmux-3.2~rc3/format.c:2569: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/tmux-3.2~rc3/format.c:2617: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/tmux-3.2~rc3/grid.c:989: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/tmux-3.2~rc3/input-keys.c:497:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bufferevent_write(bev, ike->data, strlen(ike->data)); data/tmux-3.2~rc3/input-keys.c:562:30: [1] (buffer) strlen: Does not handle 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(bev, tmp, strlen(tmp)); data/tmux-3.2~rc3/input.c:1078: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). bufferevent_write(bev, reply, strlen(reply)); data/tmux-3.2~rc3/input.c:2457: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). bsize = strlen(cp + 1); data/tmux-3.2~rc3/input.c:2633: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(end) / 4) * 3; data/tmux-3.2~rc3/key-string.c:221: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/tmux-3.2~rc3/key-string.c:369: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). off = strlen(out); data/tmux-3.2~rc3/layout-custom.c:110: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/tmux-3.2~rc3/layout-set.c:55: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/tmux-3.2~rc3/mode-tree.c:728:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (w - 2 >= strlen(text)) { data/tmux-3.2~rc3/mode-tree.c:736:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (mtd->filter != NULL && w - 2 >= strlen(text) + 10 + n + 2) { data/tmux-3.2~rc3/names.c:158: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/tmux-3.2~rc3/options.c:640: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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/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/tmux-3.2~rc3/regsub.c:76: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). end = strlen(text); data/tmux-3.2~rc3/screen-write.c:340: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/tmux-3.2~rc3/screen-write.c:493: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/tmux-3.2~rc3/server-client.c:421: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). cmdsize = strlen(cmd) + 1; data/tmux-3.2~rc3/server-client.c:429: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). shellsize = strlen(shell) + 1; data/tmux-3.2~rc3/server-client.c:1781: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). msize = strlen(c->exit_message) + 1; data/tmux-3.2~rc3/server-client.c:1796:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). proc_send(c->peer, c->exit_msgtype, -1, name, strlen(name) + 1); data/tmux-3.2~rc3/server-client.c:2278:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). proc_send(c->peer, MSG_SHELL, -1, shell, strlen(shell) + 1); data/tmux-3.2~rc3/server-client.c:2457:5: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s[strlen(s) - 1] = '\0'; data/tmux-3.2~rc3/server-fn.c:166: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 (*cmd == '\0' || strlen(cmd) + 1 > MAX_IMSGSIZE - IMSG_HEADER_SIZE) data/tmux-3.2~rc3/server-fn.c:175:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). proc_send(c->peer, MSG_LOCK, -1, cmd, strlen(cmd) + 1); data/tmux-3.2~rc3/server.c:124:10: [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/tmux-3.2~rc3/server.c:126:10: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mask = umask(S_IXUSR|S_IRWXG|S_IRWXO); data/tmux-3.2~rc3/server.c:133:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(mask); data/tmux-3.2~rc3/status.c:1006: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). size += strlen(s); data/tmux-3.2~rc3/status.c:1011: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). memmove(first + strlen(s), first, n * sizeof *c->prompt_buffer); data/tmux-3.2~rc3/status.c:1012: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). for (idx = 0; idx < strlen(s); idx++) data/tmux-3.2~rc3/status.c:1014:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). c->prompt_index = (first - c->prompt_buffer) + strlen(s); data/tmux-3.2~rc3/status.c:1307:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(s) != 1) data/tmux-3.2~rc3/status.c:1386: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). size_t slen = strlen(s), valuelen; data/tmux-3.2~rc3/status.c:1454: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/tmux-3.2~rc3/status.c:1455: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/tmux-3.2~rc3/status.c:1456: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/tmux-3.2~rc3/status.c:1581: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(tmp, word, strlen(word)) != 0) { data/tmux-3.2~rc3/status.c:1663: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). if (*s == '\0' || strncmp(loop->name, s, strlen(s)) == 0) { data/tmux-3.2~rc3/status.c:1670:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncmp(n, s + 1, strlen(s) - 1) == 0) { data/tmux-3.2~rc3/tty-features.c:291:5: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s[strlen(s) - 1] = '\0'; data/tmux-3.2~rc3/tty-keys.c:426: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/tmux-3.2~rc3/tty-term.c:378: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). } else if (s[strlen(s) - 1] == '@') { data/tmux-3.2~rc3/tty-term.c:379: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). s[strlen(s) - 1] = '\0'; data/tmux-3.2~rc3/tty.c:476: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/tmux-3.2~rc3/tty.c:486: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/tmux-3.2~rc3/tty.c:559: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). tty_add(tty, s, strlen(s)); data/tmux-3.2~rc3/tty.c:576: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). tty_add(tty, acs, strlen(acs)); data/tmux-3.2~rc3/utf8.c:349:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf = xreallocarray(NULL, 4, strlen(src) + 1); data/tmux-3.2~rc3/utf8.c:350:30: [1] (buffer) strlen: Does not handle 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 = utf8_strvis(buf, src, strlen(src), flag); data/tmux-3.2~rc3/utf8.c:378: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). end = s + strlen(s); data/tmux-3.2~rc3/utf8.c:545: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/tmux-3.2~rc3/utf8.c:566: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/tmux-3.2~rc3/window-buffer.c:260: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 (memmem(bufdata, bufsize, ss, strlen(ss)) != NULL); data/tmux-3.2~rc3/window-clock.c:237: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/tmux-3.2~rc3/window-clock.c:238: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/tmux-3.2~rc3/window-clock.c:239: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/tmux-3.2~rc3/window-clock.c:253: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/tmux-3.2~rc3/window-copy.c:2749: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(str); data/tmux-3.2~rc3/window-copy.c:3708: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(buf); data/tmux-3.2~rc3/window-copy.c:3933: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/tmux-3.2~rc3/window-copy.c:3934: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); data/tmux-3.2~rc3/window-customize.c:610: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 (*note != '\0' && note[strlen (note) - 1] != '.') data/tmux-3.2~rc3/window-customize.c:758: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). choices[strlen(choices) - 2] = '\0'; data/tmux-3.2~rc3/window-tree.c:500: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(label); data/tmux-3.2~rc3/window-tree.c:632:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(label) > width) data/tmux-3.2~rc3/window.c:1230:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (n = strlen(line); n > 0; n--) { ANALYSIS SUMMARY: Hits = 469 Lines analyzed = 74430 in approximately 1.72 seconds (43351 lines/second) Physical Source Lines of Code (SLOC) = 57500 Hits@level = [0] 67 [1] 135 [2] 289 [3] 18 [4] 20 [5] 7 Hits@level+ = [0+] 536 [1+] 469 [2+] 334 [3+] 45 [4+] 27 [5+] 7 Hits/KSLOC@level+ = [0+] 9.32174 [1+] 8.15652 [2+] 5.8087 [3+] 0.782609 [4+] 0.469565 [5+] 0.121739 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.