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/smenu-0.9.15/fgetc.c Examining data/smenu-0.9.15/fgetc.h Examining data/smenu-0.9.15/getopt.c Examining data/smenu-0.9.15/getopt.h Examining data/smenu-0.9.15/index.c Examining data/smenu-0.9.15/index.h Examining data/smenu-0.9.15/list.c Examining data/smenu-0.9.15/list.h Examining data/smenu-0.9.15/smenu.c Examining data/smenu-0.9.15/smenu.h Examining data/smenu-0.9.15/usage.c Examining data/smenu-0.9.15/usage.h Examining data/smenu-0.9.15/utf8.c Examining data/smenu-0.9.15/utf8.h Examining data/smenu-0.9.15/utils.c Examining data/smenu-0.9.15/utils.h Examining data/smenu-0.9.15/xmalloc.c Examining data/smenu-0.9.15/xmalloc.h FINAL RESULTS: data/smenu-0.9.15/smenu.c:3489: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(scroll_symbol, shift_left_sym); data/smenu-0.9.15/smenu.c:6680: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(timeout_message, timeout_word); data/smenu-0.9.15/xmalloc.c:97:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(allocated, p); data/smenu-0.9.15/smenu.c:739: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. home = getenv(base); data/smenu-0.9.15/smenu.c:5135:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("TERM") == NULL) data/smenu-0.9.15/smenu.c:5143:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("NO_COLOR") != NULL) data/smenu-0.9.15/fgetc.c:18: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 getc_buffer[GETC_BUFF_SIZE] = { '\0' }; data/smenu-0.9.15/index.c:152:3: [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 w1s[2]; data/smenu-0.9.15/index.c:153:3: [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 w2s[2]; data/smenu-0.9.15/smenu.c:324: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 s1[12] = { 0 }; data/smenu-0.9.15/smenu.c:325: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 s2[7] = { 0 }; data/smenu-0.9.15/smenu.c:646: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 name[64] = ""; data/smenu-0.9.15/smenu.c:647: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 value[256] = ""; data/smenu-0.9.15/smenu.c:648: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 section[128] = ""; data/smenu-0.9.15/smenu.c:661: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(filename, "r"); data/smenu-0.9.15/smenu.c:1379: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[32]; data/smenu-0.9.15/smenu.c:1867:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(str + rsize, orig + subs_a[index].start, delta); data/smenu-0.9.15/smenu.c:1893: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(str + rsize, orig + match_start, delta); data/smenu-0.9.15/smenu.c:2772:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(str, ptr, cr_ptr - ptr); data/smenu-0.9.15/smenu.c:3438: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 scroll_symbol[5]; data/smenu-0.9.15/smenu.c:4866: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 * special_pattern[5] = { NULL, NULL, NULL, NULL, NULL }; /* -1 .. -5 */ data/smenu-0.9.15/smenu.c:4954: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 utf8_buffer[5]; /* buffer to store the bytes of a UTF-8 glyph * data/smenu-0.9.15/smenu.c:5314: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(win.gutter_a[i], gutter + offset, mblen); data/smenu-0.9.15/smenu.c:6193:18: [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). input_file = fopen(argv[argc - 1], "r"); data/smenu-0.9.15/smenu.c:6679:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(timeout_message, "[ s before selecting the word \""); data/smenu-0.9.15/smenu.c:6681:9: [2] (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). Risk is low because the source is a constant string. strcat(timeout_message, "\"]"); data/smenu-0.9.15/smenu.c:6691:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(timeout_seconds, "%5u", timeout.initial_value / FREQ); data/smenu-0.9.15/smenu.c:6692: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(timeout_message + 1, timeout_seconds, 5); data/smenu-0.9.15/smenu.c:6772:7: [2] (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, iws_ptr, utf8_len); data/smenu-0.9.15/smenu.c:6800:7: [2] (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, ils_ptr, utf8_len); data/smenu-0.9.15/smenu.c:7720:21: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(selector, "%u", selector_value); data/smenu-0.9.15/smenu.c:7722:21: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp + 1, "%*u", data/smenu-0.9.15/smenu.c:7775:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp + 1, "%*ld", data/smenu-0.9.15/smenu.c:8150:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(temp, word_a[wi].str, s1); data/smenu-0.9.15/smenu.c:8184:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(temp, word_a[wi].str, s1); data/smenu-0.9.15/smenu.c:8726:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(timeout_seconds, "%5u", timeout.remain / FREQ); data/smenu-0.9.15/smenu.c:8729:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(timeout_string + 1, timeout_seconds, 5); data/smenu-0.9.15/smenu.c:8785:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(timeout_seconds, "%5u", timeout.initial_value / FREQ); data/smenu-0.9.15/smenu.c:8788:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(timeout_string + 1, timeout_seconds, 5); data/smenu-0.9.15/utf8.c:35: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 tmp[9]; /* temporary string */ data/smenu-0.9.15/utf8.c:247: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 trailing_bytes_for_utf8[256] = { data/smenu-0.9.15/utils.c:156:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p = result, s1, n); data/smenu-0.9.15/utils.c:164: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(p, s, l); data/smenu-0.9.15/xmalloc.c:117:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, str, len); data/smenu-0.9.15/fgetc.c:28:67: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return (next_buffer_pos > 0) ? getc_buffer[--next_buffer_pos] : fgetc(input); data/smenu-0.9.15/getopt.h:23:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (write(eopterrfd, (S), strlen(S))) \ data/smenu-0.9.15/index.c:227: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). size_t len = wcslen(w); data/smenu-0.9.15/smenu.c:329:7: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. n = sscanf(str, "%11[^,],%6s", s1, s2); data/smenu-0.9.15/smenu.c:685: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). for (s = name + strlen(name) - 1; s > name && isspace(*s); s--) data/smenu-0.9.15/smenu.c:688: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). for (s = value + strlen(value) - 1; s > value && isspace(*s); s--) data/smenu-0.9.15/smenu.c:745: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). len = strlen(home) + strlen(name) + 3; data/smenu-0.9.15/smenu.c:745: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). len = strlen(home) + strlen(name) + 3; data/smenu-0.9.15/smenu.c:1391:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(0, buf + i, 1) != 1) data/smenu-0.9.15/smenu.c:1445: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). str[strlen(str) - 1] = '\0'; data/smenu-0.9.15/smenu.c:1726: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(sed->pattern) < 4) data/smenu-0.9.15/smenu.c:1946: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). range_t * matches_a = xmalloc(strlen(orig) * sizeof(range_t)); data/smenu-0.9.15/smenu.c:1983: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). len = strlen(exp_repl); data/smenu-0.9.15/smenu.c:1994: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). end = strlen(orig); data/smenu-0.9.15/smenu.c:2060: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). long len = strlen(s); data/smenu-0.9.15/smenu.c:2638: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). pos = strlen(utf8_buffer); data/smenu-0.9.15/smenu.c:2790: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 ((n = (long)strlen(str)) > *message_max_len) data/smenu-0.9.15/smenu.c:2811: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 ((n = (long)strlen(ptr)) > *message_max_len) data/smenu-0.9.15/smenu.c:3491:9: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(scroll_symbol, "<"); data/smenu-0.9.15/smenu.c:3828: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). ptr = str + strlen(str); data/smenu-0.9.15/smenu.c:5657: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(argv[eoptind]) < 3) data/smenu-0.9.15/smenu.c:6676: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). + strlen( data/smenu-0.9.15/smenu.c:6678: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). + strlen(timeout_word)); data/smenu-0.9.15/smenu.c:6704: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). if ((len = strlen(timeout_message)) > message_max_len) data/smenu-0.9.15/smenu.c:6710:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). message_max_len = message_max_width = strlen(timeout_message); data/smenu-0.9.15/smenu.c:7644: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). char * tmp = xmalloc(strlen(word->str) + 4 + daccess.length); data/smenu-0.9.15/smenu.c:7708: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). <= strlen(word->str)) data/smenu-0.9.15/smenu.c:7739:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(word->str, ptr, strlen(ptr) + 1); data/smenu-0.9.15/smenu.c:7751: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). memmove(word->str, ptr, strlen(ptr) + 1); data/smenu-0.9.15/smenu.c:7838: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). char * tmp = xmalloc(strlen(word->str) + 4 + daccess.length); data/smenu-0.9.15/smenu.c:7877: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). strlen(word_buffer) + 1); data/smenu-0.9.15/smenu.c:7916: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). strlen(word_buffer) + 1); data/smenu-0.9.15/smenu.c:7942: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). word_len = strlen(word->str); data/smenu-0.9.15/smenu.c:8021: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). word->len = strlen(word->str); data/smenu-0.9.15/smenu.c:8144: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). s1 = (long)strlen(word_a[wi].str); data/smenu-0.9.15/smenu.c:8178: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). s1 = (long)strlen(word_a[wi].str); data/smenu-0.9.15/smenu.c:8365:68: [1] (buffer) strlen: Does not handle 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 (sscanf(ptr, "%ld%n", ¤t, &len) == 1 && len == (int)strlen(ptr)) data/smenu-0.9.15/utf8.c:42: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). init_len = strlen(s); data/smenu-0.9.15/utf8.c:46: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). utf8_to_eos_len = strlen(utf8_str); data/smenu-0.9.15/utf8.c:233: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(s); data/smenu-0.9.15/utf8.c:405:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = (long)strlen(s); data/smenu-0.9.15/utils.c:142: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). m = n = strlen(s1); data/smenu-0.9.15/utils.c:146: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). l = strlen(s); data/smenu-0.9.15/utils.c:161: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). l = strlen(s); data/smenu-0.9.15/utils.c:199: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(str); data/smenu-0.9.15/utils.c:216:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(str); data/smenu-0.9.15/utils.c:258: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). memmove(str1, str2, strlen(str2) + 1); data/smenu-0.9.15/xmalloc.c:96: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). allocated = xmalloc(strlen(p) + 1); ANALYSIS SUMMARY: Hits = 92 Lines analyzed = 13284 in approximately 0.39 seconds (34451 lines/second) Physical Source Lines of Code (SLOC) = 8959 Hits@level = [0] 190 [1] 48 [2] 38 [3] 3 [4] 3 [5] 0 Hits@level+ = [0+] 282 [1+] 92 [2+] 44 [3+] 6 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 31.4767 [1+] 10.269 [2+] 4.91126 [3+] 0.669718 [4+] 0.334859 [5+] 0 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.