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/lua-curses-9.0.0/ext/curses.c Examining data/lua-curses-9.0.0/ext/curses/chstr.c Examining data/lua-curses-9.0.0/ext/curses/window.c Examining data/lua-curses-9.0.0/ext/include/_helpers.c Examining data/lua-curses-9.0.0/ext/include/compat-5.2.c Examining data/lua-curses-9.0.0/ext/include/compat-5.2.h Examining data/lua-curses-9.0.0/ext/include/strlcpy.c FINAL RESULTS: data/lua-curses-9.0.0/ext/curses.c:1192: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 ti_capname[32]; data/lua-curses-9.0.0/ext/curses/chstr.c:230:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ncs->str, cs->str, CHSTR_SIZE(cs->len)); data/lua-curses-9.0.0/ext/curses/window.c:95:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[34]; data/lua-curses-9.0.0/ext/curses/window.c:97:3: [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(buff, "closed"); data/lua-curses-9.0.0/ext/curses/window.c:99:3: [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(buff, "%p", lua_touserdata(L, 1)); data/lua-curses-9.0.0/ext/curses/window.c:1359:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LUAL_BUFFERSIZE]; data/lua-curses-9.0.0/ext/curses/window.c:1386:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LUAL_BUFFERSIZE]; data/lua-curses-9.0.0/ext/curses/window.c:1489:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LUAL_BUFFERSIZE]; data/lua-curses-9.0.0/ext/curses/window.c:1517:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LUAL_BUFFERSIZE]; data/lua-curses-9.0.0/ext/include/compat-5.2.c:621: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(newptr, B->ptr, B->nelems); data/lua-curses-9.0.0/ext/include/compat-5.2.c:632: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(luaL_prepbuffsize(B, l), s, l); data/lua-curses-9.0.0/ext/include/compat-5.2.h:132: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). luaL_addlstring(B, s, strlen(s)) ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 5146 in approximately 0.15 seconds (35135 lines/second) Physical Source Lines of Code (SLOC) = 2686 Hits@level = [0] 0 [1] 1 [2] 11 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 12 [1+] 12 [2+] 11 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 4.46761 [1+] 4.46761 [2+] 4.09531 [3+] 0 [4+] 0 [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.