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/foot-1.5.3/async.c Examining data/foot-1.5.3/async.h Examining data/foot-1.5.3/base64.c Examining data/foot-1.5.3/base64.h Examining data/foot-1.5.3/client.c Examining data/foot-1.5.3/commands.c Examining data/foot-1.5.3/commands.h Examining data/foot-1.5.3/config.c Examining data/foot-1.5.3/config.h Examining data/foot-1.5.3/csi.c Examining data/foot-1.5.3/csi.h Examining data/foot-1.5.3/dcs.c Examining data/foot-1.5.3/dcs.h Examining data/foot-1.5.3/extract.c Examining data/foot-1.5.3/extract.h Examining data/foot-1.5.3/fdm.c Examining data/foot-1.5.3/fdm.h Examining data/foot-1.5.3/grid.c Examining data/foot-1.5.3/grid.h Examining data/foot-1.5.3/input.c Examining data/foot-1.5.3/input.h Examining data/foot-1.5.3/keymap.h Examining data/foot-1.5.3/log.c Examining data/foot-1.5.3/log.h Examining data/foot-1.5.3/macros.h Examining data/foot-1.5.3/main.c Examining data/foot-1.5.3/misc.c Examining data/foot-1.5.3/misc.h Examining data/foot-1.5.3/osc.c Examining data/foot-1.5.3/osc.h Examining data/foot-1.5.3/quirks.c Examining data/foot-1.5.3/quirks.h Examining data/foot-1.5.3/reaper.c Examining data/foot-1.5.3/reaper.h Examining data/foot-1.5.3/render.c Examining data/foot-1.5.3/render.h Examining data/foot-1.5.3/search.c Examining data/foot-1.5.3/search.h Examining data/foot-1.5.3/selection.c Examining data/foot-1.5.3/selection.h Examining data/foot-1.5.3/server.c Examining data/foot-1.5.3/server.h Examining data/foot-1.5.3/shm.c Examining data/foot-1.5.3/shm.h Examining data/foot-1.5.3/sixel-hls.c Examining data/foot-1.5.3/sixel-hls.h Examining data/foot-1.5.3/sixel.c Examining data/foot-1.5.3/sixel.h Examining data/foot-1.5.3/slave.c Examining data/foot-1.5.3/slave.h Examining data/foot-1.5.3/spawn.c Examining data/foot-1.5.3/spawn.h Examining data/foot-1.5.3/terminal.c Examining data/foot-1.5.3/terminal.h Examining data/foot-1.5.3/tokenize.c Examining data/foot-1.5.3/tokenize.h Examining data/foot-1.5.3/user-notification.h Examining data/foot-1.5.3/util.h Examining data/foot-1.5.3/vt.c Examining data/foot-1.5.3/vt.h Examining data/foot-1.5.3/wayland.c Examining data/foot-1.5.3/wayland.h Examining data/foot-1.5.3/xmalloc.c Examining data/foot-1.5.3/xmalloc.h FINAL RESULTS: data/foot-1.5.3/config.c:142:19: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. int len = snprintf(NULL, 0, __VA_ARGS__); \ data/foot-1.5.3/config.c:145:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(text, len + errno_len + 1, __VA_ARGS__); \ data/foot-1.5.3/config.c:225:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(&path[idx], it->item.component); data/foot-1.5.3/log.c:72:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, va); data/foot-1.5.3/log.c:100:13: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. int n = vsnprintf(msg, sizeof(msg), fmt, va); data/foot-1.5.3/osc.c:413:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(p, path); data/foot-1.5.3/render.c:1476:9: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. swprintf(_text, sizeof(_text) / sizeof(_text[0]), L"%u%%", (int)(100 * percent)); data/foot-1.5.3/render.c:1481:9: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. swprintf(_text, sizeof(_text) / sizeof(_text[0]), L"%d", rebased_view + 1); data/foot-1.5.3/render.c:1546:5: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. swprintf(text, sizeof(text) / sizeof(text[0]), L"%.2f µs", usecs); data/foot-1.5.3/slave.c:226:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(arg0, argv[0]); data/foot-1.5.3/slave.c:232:5: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(file, argv); data/foot-1.5.3/spawn.c:39:13: [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(argv[0], argv) < 0) data/foot-1.5.3/terminal.c:772:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(names[i], it->item.pattern); data/foot-1.5.3/terminal.c:773:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(names[i], size); data/foot-1.5.3/xmalloc.c:68:13: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. int n = vsnprintf(NULL, 0, format, ap2); data/foot-1.5.3/xmalloc.c:74:12: [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. return vsnprintf(*strp, n + 1, format, ap); data/foot-1.5.3/client.c:81:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int c = getopt_long(argc, argv, "+:t:a:s:l::hv", longopts, NULL); data/foot-1.5.3/client.c:176:35: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *xdg_runtime = getenv("XDG_RUNTIME_DIR"); data/foot-1.5.3/client.c:178:43: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *wayland_display = getenv("WAYLAND_DISPLAY"); data/foot-1.5.3/config.c:157:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *shell = getenv("SHELL"); data/foot-1.5.3/config.c:277:35: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *xdg_config_home = getenv("XDG_CONFIG_HOME"); data/foot-1.5.3/config.c:319:35: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *xdg_config_dirs = getenv("XDG_CONFIG_DIRS"); data/foot-1.5.3/config.c:1739:31: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *xdg_runtime = getenv("XDG_RUNTIME_DIR"); data/foot-1.5.3/config.c:1743:35: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *wayland_display = getenv("WAYLAND_DISPLAY"); data/foot-1.5.3/main.c:193:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int c = getopt_long(argc, argv, "+c:Ct:a:Lf:g:w:W:s::Pp:l::Svh", longopts, NULL); data/foot-1.5.3/quirks.c:20:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. is_weston = getenv("WESTON_CONFIG_FILE") != NULL; data/foot-1.5.3/quirks.c:79:35: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *cur_desktop = getenv("XDG_CURRENT_DESKTOP"); data/foot-1.5.3/wayland.c:1346:33: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *xcursor_theme = getenv("XCURSOR_THEME"); data/foot-1.5.3/wayland.c:1350:39: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *env_cursor_size = getenv("XCURSOR_SIZE"); data/foot-1.5.3/base64.c:31:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char lookup[64] = { data/foot-1.5.3/base64.c:133:55: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. base64_encode_final(const uint8_t *data, size_t size, char result[4]) data/foot-1.5.3/base64.h:8:60: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. void base64_encode_final(const uint8_t *data, size_t size, char result[4]); data/foot-1.5.3/config.c:283:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(xdg_config_home, O_RDONLY); data/foot-1.5.3/config.c:287:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int home_fd = open(user_home_dir, O_RDONLY); data/foot-1.5.3/config.c:331:26: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int xdg_fd = open(xdg_dir, O_RDONLY); data/foot-1.5.3/config.c:1959:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(conf_path, O_RDONLY); data/foot-1.5.3/csi.c:40:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[1024]; data/foot-1.5.3/csi.c:1157:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 reply[64]; data/foot-1.5.3/csi.c:1188:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 reply[64]; data/foot-1.5.3/csi.c:1198:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 reply[64]; data/foot-1.5.3/csi.c:1211:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 reply[64]; data/foot-1.5.3/csi.c:1220:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 reply[64]; data/foot-1.5.3/csi.c:1229:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 reply[64]; data/foot-1.5.3/csi.c:1294:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 reply[64]; data/foot-1.5.3/csi.c:1350: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. char reply[32]; data/foot-1.5.3/csi.c:1444:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 reply[64]; data/foot-1.5.3/input.c:189:21: [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). stdout_fd = open("/dev/null", O_WRONLY); data/foot-1.5.3/input.c:190:21: [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). stderr_fd = open("/dev/null", O_WRONLY); data/foot-1.5.3/input.c:789: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 foo[100]; data/foot-1.5.3/input.c:937: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. char reply[1024]; data/foot-1.5.3/input.c:969:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 utf8[8]; data/foot-1.5.3/log.c:62: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 clr[16]; data/foot-1.5.3/log.c:99: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 msg[4096]; data/foot-1.5.3/main.c:108:23: [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 ((pid_fd = open(pid_file, data/foot-1.5.3/main.c:118: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. char pid[32]; data/foot-1.5.3/osc.c:153: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. char res[4]; data/foot-1.5.3/osc.c:388: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 this_host[HOST_NAME_MAX]; data/foot-1.5.3/osc.c:419: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. memcpy(p, path, prefix_len); data/foot-1.5.3/osc.c:569:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 reply[32]; data/foot-1.5.3/osc.c:615: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. char reply[32]; data/foot-1.5.3/osc.c:649: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. char reply[32]; data/foot-1.5.3/render.c:125: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 msg[1024]; data/foot-1.5.3/render.c:894: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 proc_title[16]; data/foot-1.5.3/render.c:1469:5: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t _text[64]; data/foot-1.5.3/render.c:1544:5: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t text[256]; data/foot-1.5.3/render.c:1618:13: [2] (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->mmapped, term->render.last_buf->mmapped, buf->size); data/foot-1.5.3/selection.c:1117: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. char text[256]; data/foot-1.5.3/shm.c:419: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((uint8_t *)buf->real_mmapped + new_offset, buf->mmapped, buf->size); data/foot-1.5.3/sixel.c:392:13: [2] (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/foot-1.5.3/sixel.c:717:13: [2] (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/foot-1.5.3/sixel.c:831:13: [2] (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_data[r * new_width], &old_data[r * old_width], old_width * sizeof(uint32_t)); data/foot-1.5.3/sixel.c:1094: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 reply[24]; data/foot-1.5.3/sixel.c:1128: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 reply[24]; data/foot-1.5.3/sixel.c:1137: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 reply[64]; data/foot-1.5.3/sixel.c:1170: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 reply[64]; data/foot-1.5.3/slave.c:28:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen("/etc/shells", "r"); data/foot-1.5.3/slave.c:170: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). pts = open(pts_name, O_RDWR); data/foot-1.5.3/terminal.c:58: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(copy, data, len); data/foot-1.5.3/terminal.c:757: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 *names[count]; data/foot-1.5.3/terminal.c:762: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. char size[64]; data/foot-1.5.3/terminal.c:777: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 attrs0[256], attrs1[256], attrs2[256], attrs3[256]; data/foot-1.5.3/terminal.c:2112: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 response[128]; data/foot-1.5.3/terminal.h:83:5: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t combining[5]; data/foot-1.5.3/terminal.h:137: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 private[2]; data/foot-1.5.3/vt.c:82:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[1024]; data/foot-1.5.3/wayland.c:494: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 state_str[2048]; data/foot-1.5.3/base64.c:49:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t len = strlen(s); data/foot-1.5.3/client.c:168:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.sun_path, server_socket_path, sizeof(addr.sun_path) - 1); data/foot-1.5.3/client.c:193:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(addr.sun_path, "/tmp/foot.sock", sizeof(addr.sun_path) - 1); data/foot-1.5.3/client.c:213: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). const uint16_t cwd_len = strlen(cwd) + 1; data/foot-1.5.3/client.c:214: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). const uint16_t term_len = strlen(term) + 1; data/foot-1.5.3/client.c:215: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). const uint16_t title_len = strlen(title) + 1; data/foot-1.5.3/client.c:216: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). const uint16_t app_id_len = strlen(app_id) + 1; data/foot-1.5.3/client.c:231:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). uint16_t len = strlen(argv[i]) + 1; data/foot-1.5.3/client.c:298:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). uint16_t len = strlen(argv[i]) + 1; data/foot-1.5.3/config.c:217: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). len += strlen(it->item.component) + 1; data/foot-1.5.3/config.c:226: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). idx += strlen(it->item.component); data/foot-1.5.3/config.c:1635:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *end = line + strlen(line) - 1; data/foot-1.5.3/config.c:1690: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). value = key + strlen(key); data/foot-1.5.3/config.c:1697: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). char *end = key + strlen(key) - 1; data/foot-1.5.3/config.c:1709:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *end = value + strlen(value) - 1; data/foot-1.5.3/csi.c:699: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/csi.c:1160: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/csi.c:1191: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/csi.c:1202: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/csi.c:1215: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/csi.c:1223: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/csi.c:1233: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/csi.c:1297: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/csi.c:1352: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/csi.c:1448: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/input.c:210: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). len = text != NULL ? strlen(text) : 0; data/foot-1.5.3/input.c:869: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). term_to_slave(term, keymap->seq, strlen(keymap->seq)); data/foot-1.5.3/input.c:939:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/main.c:73: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). assert(strlen(u8"ö") == 2); data/foot-1.5.3/main.c:121: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). ssize_t bytes = write(pid_fd, pid, strlen(pid)); data/foot-1.5.3/main.c:231:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *end = font + strlen(font); data/foot-1.5.3/main.c:237: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). if (strlen(font) == 0) data/foot-1.5.3/osc.c:120:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert(strlen(chunk) == 4); data/foot-1.5.3/osc.c:141: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). assert(strlen(chunk) % 4 == 0); data/foot-1.5.3/osc.c:142: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). term_to_slave(term, chunk, strlen(chunk)); data/foot-1.5.3/osc.c:246: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). if (strlen(p) == 1 && p[0] == '?') data/foot-1.5.3/osc.c:266:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t len = strlen(string); data/foot-1.5.3/osc.c:306: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). size_t len = strlen(string); data/foot-1.5.3/osc.c:405: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). char *pwd = xmalloc(strlen(path) + 1); data/foot-1.5.3/osc.c:563: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 (strlen(s_color) == 1 && s_color[0] == '?') { data/foot-1.5.3/osc.c:572: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/osc.c:605: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). if (strlen(string) == 1 && string[0] == '?') { data/foot-1.5.3/osc.c:620: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/osc.c:644: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). if (strlen(string) == 1 && string[0] == '?') { data/foot-1.5.3/osc.c:651: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/osc.c:679: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). if (strlen(string) == 0) { data/foot-1.5.3/reaper.c:107:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t amount = read(reaper->fd, &info, sizeof(info)); data/foot-1.5.3/render.c:1357:28: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (size_t i = 0; i < wcslen(text); i++) { data/foot-1.5.3/render.c:1487:22: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cell_count = wcslen(text); data/foot-1.5.3/render.c:1535:41: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). width, height, width - margin - wcslen(text) * term->cell_width, margin); data/foot-1.5.3/render.c:1548:28: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const int cell_count = wcslen(text); data/foot-1.5.3/render.c:1963: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). if (strlen(title) > max_len) { data/foot-1.5.3/selection.c:850:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t len = strlen(selection); data/foot-1.5.3/selection.c:944:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t len = strlen(selection); data/foot-1.5.3/selection.c:1085:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(fd, &expire_count, sizeof(expire_count)); data/foot-1.5.3/selection.c:1118:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t count = read(fd, text, sizeof(text)); data/foot-1.5.3/server.c:130:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t count = read(fd, dummy, sizeof(dummy)); data/foot-1.5.3/server.c:214:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cwd_len != strlen(cwd) + 1) { data/foot-1.5.3/server.c:216: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). cwd_len - 1, strlen(cwd)); data/foot-1.5.3/server.c:229:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (term_env_len != strlen(term_env) + 1) { data/foot-1.5.3/server.c:231: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). term_env_len - 1, strlen(term_env)); data/foot-1.5.3/server.c:244: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 (title_len != strlen(title) + 1) { data/foot-1.5.3/server.c:246: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). title_len - 1, strlen(title)); data/foot-1.5.3/server.c:259: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). if (app_id_len != strlen(app_id) + 1) { data/foot-1.5.3/server.c:261: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). app_id_len - 1, strlen(app_id)); data/foot-1.5.3/server.c:291: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). argv[i] = (char *)p; p += strlen(argv[i]) + 1; data/foot-1.5.3/server.c:294:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (len != strlen(argv[i]) + 1) { data/foot-1.5.3/server.c:296: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). i, len - 1, strlen(argv[i])); data/foot-1.5.3/server.c:305: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). client->conf.term = strlen(term_env) > 0 data/foot-1.5.3/server.c:307: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). client->conf.title = strlen(title) > 0 data/foot-1.5.3/server.c:309: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). client->conf.app_id = strlen(app_id) > 0 data/foot-1.5.3/server.c:395:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.sun_path, sock_path, sizeof(addr.sun_path) - 1); data/foot-1.5.3/server.c:442:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.sun_path, sock_path, sizeof(addr.sun_path) - 1); data/foot-1.5.3/sixel.c:1096: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/sixel.c:1130: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/sixel.c:1140: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/sixel.c:1172: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). term_to_slave(term, reply, strlen(reply)); data/foot-1.5.3/slave.c:49:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *end = line + strlen(line) - 1; data/foot-1.5.3/slave.c:95: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 (write(fd, prefix, strlen(prefix)) < 0 || data/foot-1.5.3/slave.c:96: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). write(fd, notif->text, strlen(notif->text)) < 0 || data/foot-1.5.3/slave.c:97: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). write(fd, postfix, strlen(postfix)) < 0) data/foot-1.5.3/slave.c:223: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). char *arg0 = xmalloc(strlen(argv[0]) + 1 + 1); data/foot-1.5.3/slave.c:327:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(fork_pipe[0], &_errno, sizeof(_errno)); data/foot-1.5.3/spawn.c:54:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(pipe_fds[0], &_errno, sizeof(_errno)); data/foot-1.5.3/terminal.c:227:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). count = read(term->ptmx, buf, sizeof(buf)); data/foot-1.5.3/terminal.c:330:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read( data/foot-1.5.3/terminal.c:358:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read( data/foot-1.5.3/terminal.c:439:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read( data/foot-1.5.3/terminal.c:474:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret1 = read(term->delayed_render_timer.lower_fd, &unused, sizeof(unused)); data/foot-1.5.3/terminal.c:476:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret2 = read(term->delayed_render_timer.upper_fd, &unused, sizeof(unused)); data/foot-1.5.3/terminal.c:517:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(term->render.app_sync_updates.timer_fd, data/foot-1.5.3/terminal.c:769: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 len = strlen(it->item.pattern) + strlen(size) + 1; data/foot-1.5.3/terminal.c:769: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). size_t len = strlen(it->item.pattern) + strlen(size) + 1; data/foot-1.5.3/terminal.c:2141: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). term_to_slave(term, response, strlen(response)); data/foot-1.5.3/tokenize.c:65: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). memmove(end - 1, end, strlen(end)); data/foot-1.5.3/tokenize.c:66: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). end[strlen(end) - 1] = '\0'; data/foot-1.5.3/wayland.c:695:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read( ANALYSIS SUMMARY: Hits = 183 Lines analyzed = 24117 in approximately 0.57 seconds (42465 lines/second) Physical Source Lines of Code (SLOC) = 18590 Hits@level = [0] 78 [1] 97 [2] 57 [3] 13 [4] 16 [5] 0 Hits@level+ = [0+] 261 [1+] 183 [2+] 86 [3+] 29 [4+] 16 [5+] 0 Hits/KSLOC@level+ = [0+] 14.0398 [1+] 9.844 [2+] 4.62614 [3+] 1.55998 [4+] 0.860678 [5+] 0 Dot directories skipped = 2 (--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.