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/imv-4.1.0/src/backend.h Examining data/imv-4.1.0/src/backend_freeimage.c Examining data/imv-4.1.0/src/backend_libjpeg.c Examining data/imv-4.1.0/src/backend_libnsgif.c Examining data/imv-4.1.0/src/backend_libpng.c Examining data/imv-4.1.0/src/backend_librsvg.c Examining data/imv-4.1.0/src/backend_libtiff.c Examining data/imv-4.1.0/src/binds.c Examining data/imv-4.1.0/src/binds.h Examining data/imv-4.1.0/src/bitmap.c Examining data/imv-4.1.0/src/bitmap.h Examining data/imv-4.1.0/src/canvas.c Examining data/imv-4.1.0/src/canvas.h Examining data/imv-4.1.0/src/commands.c Examining data/imv-4.1.0/src/commands.h Examining data/imv-4.1.0/src/console.c Examining data/imv-4.1.0/src/console.h Examining data/imv-4.1.0/src/dummy_window.c Examining data/imv-4.1.0/src/image.c Examining data/imv-4.1.0/src/image.h Examining data/imv-4.1.0/src/imv.h Examining data/imv-4.1.0/src/imv_msg.c Examining data/imv-4.1.0/src/ini.c Examining data/imv-4.1.0/src/ini.h Examining data/imv-4.1.0/src/ipc.c Examining data/imv-4.1.0/src/ipc.h Examining data/imv-4.1.0/src/ipc_common.c Examining data/imv-4.1.0/src/keyboard.c Examining data/imv-4.1.0/src/keyboard.h Examining data/imv-4.1.0/src/list.c Examining data/imv-4.1.0/src/list.h Examining data/imv-4.1.0/src/log.c Examining data/imv-4.1.0/src/log.h Examining data/imv-4.1.0/src/main.c Examining data/imv-4.1.0/src/navigator.c Examining data/imv-4.1.0/src/navigator.h Examining data/imv-4.1.0/src/source.c Examining data/imv-4.1.0/src/source.h Examining data/imv-4.1.0/src/source_private.h Examining data/imv-4.1.0/src/viewport.c Examining data/imv-4.1.0/src/viewport.h Examining data/imv-4.1.0/src/window.h Examining data/imv-4.1.0/src/wl_window.c Examining data/imv-4.1.0/src/x11_window.c Examining data/imv-4.1.0/src/xdg-shell-client-protocol.h Examining data/imv-4.1.0/src/xdg-shell-protocol.c Examining data/imv-4.1.0/src/imv.c Examining data/imv-4.1.0/test/list.c Examining data/imv-4.1.0/test/navigator.c FINAL RESULTS: data/imv-4.1.0/src/imv_msg.c:32:5: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(buf, argv[i], sizeof buf - 1); data/imv-4.1.0/src/imv_msg.c:34:7: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(buf, " ", sizeof buf - 1); data/imv-4.1.0/src/imv_msg.c:37:3: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(buf, "\n", sizeof buf - 1); data/imv-4.1.0/src/binds.c:281:16: [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. printed += snprintf(buf, len - printed, format, key); data/imv-4.1.0/src/canvas.c:135:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(line, sizeof line, fmt, args); data/imv-4.1.0/src/imv.c:1257:20: [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 (!path || access(path, R_OK) == -1) { data/imv-4.1.0/src/imv.c:1569: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(argstr); data/imv-4.1.0/src/log.c:29:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(g_log_buffer, sizeof g_log_buffer, fmt, args); data/imv-4.1.0/src/imv.c:744:15: [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 ((o = getopt(argc, argv, "frdxhvlu:s:n:b:t:c:")) != -1) { data/imv-4.1.0/src/ipc_common.c:8:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *base = getenv("XDG_RUNTIME_DIR"); data/imv-4.1.0/src/navigator.c:56:20: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. nav_item->path = realpath(path, NULL); data/imv-4.1.0/src/backend_libjpeg.c:77: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). private.fd = open(path, O_RDONLY); data/imv-4.1.0/src/backend_libjpeg.c:113: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(new_private, &private, sizeof private); data/imv-4.1.0/src/backend_libjpeg.c:140: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(new_private, &private, sizeof private); data/imv-4.1.0/src/backend_libnsgif.c:86: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(bmp->data, private->gif.frame_image, len); data/imv-4.1.0/src/backend_libnsgif.c:159: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). int fd = open(path, O_RDONLY); data/imv-4.1.0/src/backend_libpng.c:79: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. unsigned char header[8]; data/imv-4.1.0/src/backend_libpng.c:80:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(path, "rb"); data/imv-4.1.0/src/backend_librsvg.c:18: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 path[PATH_MAX+8]; data/imv-4.1.0/src/backend_librsvg.c:55: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 header[4096]; data/imv-4.1.0/src/backend_librsvg.c:56:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(path, "rb"); data/imv-4.1.0/src/backend_librsvg.c:80: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 header[4096]; data/imv-4.1.0/src/backend_librsvg.c:85: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(header, data, header_len); data/imv-4.1.0/src/backend_libtiff.c:22: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(buffer, (char*)private->data + private->pos, len); data/imv-4.1.0/src/backend_libtiff.c:30: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((char*)private->data + private->pos, buffer, len); data/imv-4.1.0/src/backend_libtiff.c:123: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(new_private, &private, sizeof private); data/imv-4.1.0/src/binds.c:251: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(key, keys + 1 /* skip the '<' */, key_len - 1); data/imv-4.1.0/src/bitmap.c:14: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->data, bmp->data, num_bytes); data/imv-4.1.0/src/canvas.c:132: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 line[1024]; data/imv-4.1.0/src/console.c:201: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(&console->buffer[old_cursor], text, to_insert); data/imv-4.1.0/src/imv.c:270: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 command_buf[512]; data/imv-4.1.0/src/imv.c:688: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[PATH_MAX]; data/imv-4.1.0/src/imv.c:938: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. char title[1024]; data/imv-4.1.0/src/imv.c:1162: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 title_text[1024]; data/imv-4.1.0/src/imv.c:1199: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 overlay_text[1024]; data/imv-4.1.0/src/imv.c:1360: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). imv->font.size = atoi(sep + 1); data/imv-4.1.0/src/imv.c:1705: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 str[64]; data/imv-4.1.0/src/imv_msg.c:23:53: [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). imv_ipc_path(desc.sun_path, sizeof desc.sun_path, atoi(argv[1])); data/imv-4.1.0/src/imv_msg.c:30: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[4096] = {0}; data/imv-4.1.0/src/ini.c:84: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 line[INI_MAX_LINE]; data/imv-4.1.0/src/ini.c:88: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 section[MAX_SECTION] = ""; data/imv-4.1.0/src/ini.c:89: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 prev_name[MAX_NAME] = ""; data/imv-4.1.0/src/ini.c:201:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen(filename, "r"); data/imv-4.1.0/src/ipc.c:27: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 buf[1024]; data/imv-4.1.0/src/ipc.c:109: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 ipc_filename[1024]; data/imv-4.1.0/src/keyboard.c:97: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 keyname[128] = {0}; data/imv-4.1.0/src/keyboard.c:116: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[128]; data/imv-4.1.0/src/log.c:11:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char g_log_buffer[16384]; data/imv-4.1.0/src/navigator.c:74: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 path_buf[PATH_MAX+1]; data/imv-4.1.0/src/wl_window.c:141: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 keyname[32] = {0}; data/imv-4.1.0/src/wl_window.c:144: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 text[64] = {0}; data/imv-4.1.0/src/x11_window.c:295: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 keyname[32] = {0}; data/imv-4.1.0/src/x11_window.c:298: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 text[64] = {0}; data/imv-4.1.0/test/navigator.c:81:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(FILENAME1, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); data/imv-4.1.0/test/navigator.c:95: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(FILENAME1, O_RDWR); data/imv-4.1.0/src/binds.c:280: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). const char *format = strlen(key) > 1 ? "<%s>" : "%s"; data/imv-4.1.0/src/commands.c:68: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). const char *argstr = command + strlen(cmd->command) + 1; data/imv-4.1.0/src/commands.c:73: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). size_t cmd_len = strlen(cmd->alias) + 1 + strlen(new_args) + 1; data/imv-4.1.0/src/commands.c:73:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t cmd_len = strlen(cmd->alias) + 1 + strlen(new_args) + 1; data/imv-4.1.0/src/console.c:106:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(console->buffer, data/imv-4.1.0/src/console.c:109: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). console->cursor = strlen(console->buffer); data/imv-4.1.0/src/console.c:121:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(console->buffer, console->history_before, console->buffer_len); data/imv-4.1.0/src/console.c:122: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). console->cursor = strlen(console->buffer); data/imv-4.1.0/src/console.c:129:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(console->buffer, data/imv-4.1.0/src/console.c:132: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). console->cursor = strlen(console->buffer); data/imv-4.1.0/src/console.c:189: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(text) + strlen(console->buffer) + 1 > console->buffer_len) { data/imv-4.1.0/src/console.c:189: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 (strlen(text) + strlen(console->buffer) + 1 > console->buffer_len) { data/imv-4.1.0/src/console.c:196: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 to_insert = strlen(text); data/imv-4.1.0/src/console.c:199:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t to_shift = strlen(console->buffer) - old_cursor; data/imv-4.1.0/src/console.c:253: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). console->cursor = strlen(console->buffer); data/imv-4.1.0/src/console.c:261: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). size_t to_shift = strlen(console->buffer) - new_cursor; data/imv-4.1.0/src/imv.c:243: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). const size_t prefix_len = strlen(prefix); data/imv-4.1.0/src/imv.c:286:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(command_buf, commands, command_len); data/imv-4.1.0/src/imv.c:690: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(buf); data/imv-4.1.0/src/imv.c:1773:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((r = read(STDIN_FILENO, (uint8_t *)*buffer + len, step)) == -1) { data/imv-4.1.0/src/imv_msg.c:39: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). write(sockfd, buf, strlen(buf)); data/imv-4.1.0/src/ini.c:36: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). char* p = s + strlen(s); data/imv-4.1.0/src/ini.c:73:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dest, src, size); data/imv-4.1.0/src/ini.c:241: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). ctx.num_left = strlen(string); data/imv-4.1.0/src/list.c:121:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sep_len = strlen(sep); data/imv-4.1.0/src/list.c:123: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). size_t item_len = strlen(list->items[i]); data/imv-4.1.0/src/list.c:130:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf, list->items[i], cap - 1); data/imv-4.1.0/src/list.c:133:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf, sep, cap - 1); data/imv-4.1.0/src/wl_window.c:897:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t len = read(window->pipe_fds[0], &e, sizeof e); data/imv-4.1.0/src/x11_window.c:416:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t len = read(window->pipe_fds[0], &e, sizeof e); ANALYSIS SUMMARY: Hits = 85 Lines analyzed = 10066 in approximately 0.27 seconds (37174 lines/second) Physical Source Lines of Code (SLOC) = 6858 Hits@level = [0] 23 [1] 30 [2] 44 [3] 3 [4] 5 [5] 3 Hits@level+ = [0+] 108 [1+] 85 [2+] 55 [3+] 11 [4+] 8 [5+] 3 Hits/KSLOC@level+ = [0+] 15.748 [1+] 12.3943 [2+] 8.01983 [3+] 1.60397 [4+] 1.16652 [5+] 0.437445 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.