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/fizmo-ncursesw-0.7.14/src/locales/fizmo_ncursesw_locales.c Examining data/fizmo-ncursesw-0.7.14/src/locales/fizmo_ncursesw_locales.h Examining data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c FINAL RESULTS: data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2762:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(absdirname ,"%s/%s", cwd, argv[argi]); data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2797:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(absdirname ,"%s/%s", cwd, argv[argi]); data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:1223:19: [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. env_window_id = getenv("WINDOWID"); data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:105:8: [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. static wchar_t wchar_t_buf[NCURSESW_WCHAR_T_BUF_SIZE]; data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:107: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 output_char_buf[NCURSESW_OUTPUT_CHAR_BUF_SIZE]; data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:126:8: [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. static wchar_t ncursesw_setcchar_init_string[2]; data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:1227:17: [2] (integer) atol: 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). window_id = atol(env_window_id); data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2658:19: [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). int_value = atoi(argv[argi]); data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:1185:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret_val = read(STDIN_FILENO, &x11_read_buf, 1); data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:1195:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret_val = read(x11_signalling_pipe[0], &x11_read_buf, 1); data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:1607:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_retval = read( data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2047: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). len = (long)strlen(entry->title) > story_title_length data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2050:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((long)strlen(entry->title) > story_title_length) data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2061: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). len = (long)strlen(entry->title) > story_title_length data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2064:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((long)strlen(entry->title) > story_title_length) data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2218:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_retval = read( data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2748:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(argv[argi]) > 0) data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2757:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (absdirname_len < strlen(cwd) + strlen(argv[argi]) + 2) data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2757:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (absdirname_len < strlen(cwd) + strlen(argv[argi]) + 2) data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2759: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). absdirname_len = strlen(cwd) + strlen(argv[argi]) + 2; data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2759: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). absdirname_len = strlen(cwd) + strlen(argv[argi]) + 2; data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2783:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(argv[argi]) > 0) data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2792:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (absdirname_len < strlen(cwd) + strlen(argv[argi]) + 2) data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2792:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (absdirname_len < strlen(cwd) + strlen(argv[argi]) + 2) data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2794: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). absdirname_len = strlen(cwd) + strlen(argv[argi]) + 2; data/fizmo-ncursesw-0.7.14/src/fizmo-ncursesw/fizmo-ncursesw.c:2794: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). absdirname_len = strlen(cwd) + strlen(argv[argi]) + 2; ANALYSIS SUMMARY: Hits = 26 Lines analyzed = 3125 in approximately 0.08 seconds (40172 lines/second) Physical Source Lines of Code (SLOC) = 2414 Hits@level = [0] 7 [1] 18 [2] 5 [3] 1 [4] 2 [5] 0 Hits@level+ = [0+] 33 [1+] 26 [2+] 8 [3+] 3 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 13.6703 [1+] 10.7705 [2+] 3.314 [3+] 1.24275 [4+] 0.8285 [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.