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-rexlib-2.7.2/src/algo.h Examining data/lua-rexlib-2.7.2/src/common.c Examining data/lua-rexlib-2.7.2/src/common.h Examining data/lua-rexlib-2.7.2/src/gnu/lgnu.c Examining data/lua-rexlib-2.7.2/src/oniguruma/lonig.c Examining data/lua-rexlib-2.7.2/src/oniguruma/lonig_f.c Examining data/lua-rexlib-2.7.2/src/pcre/lpcre.c Examining data/lua-rexlib-2.7.2/src/pcre/lpcre_f.c Examining data/lua-rexlib-2.7.2/src/posix/lposix.c Examining data/lua-rexlib-2.7.2/src/tre/ltre.c Examining data/lua-rexlib-2.7.2/src/tre/ltre_w.c FINAL RESULTS: data/lua-rexlib-2.7.2/src/pcre/lpcre.c:198:5: [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 (old_locale, setlocale (LC_CTYPE, NULL)); /* store the locale */ data/lua-rexlib-2.7.2/src/common.c:169: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 (buf->arr + buf->top, src, sz); data/lua-rexlib-2.7.2/src/gnu/lgnu.c:116:18: [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 *) translate)[i] = *lua_tostring (L, -1); data/lua-rexlib-2.7.2/src/oniguruma/lonig.c:105: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 [ONIG_MAX_ERROR_MESSAGE_LEN]; data/lua-rexlib-2.7.2/src/oniguruma/lonig.c:342:33: [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). if (ONIGURUMA_VERSION_MAJOR > atoi (onig_version ())) { data/lua-rexlib-2.7.2/src/pcre/lpcre.c:197: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 old_locale[256]; data/lua-rexlib-2.7.2/src/pcre/lpcre.c:408:20: [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). if (PCRE_MAJOR > atoi (pcre_version ())) { data/lua-rexlib-2.7.2/src/posix/lposix.c:89: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 errbuf[80]; data/lua-rexlib-2.7.2/src/tre/ltre.c:92: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 errbuf[80]; data/lua-rexlib-2.7.2/src/tre/ltre_w.c:95: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 errbuf[80]; ANALYSIS SUMMARY: Hits = 10 Lines analyzed = 3874 in approximately 0.13 seconds (29089 lines/second) Physical Source Lines of Code (SLOC) = 3251 Hits@level = [0] 0 [1] 0 [2] 9 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 10 [1+] 10 [2+] 10 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 3.07598 [1+] 3.07598 [2+] 3.07598 [3+] 0.307598 [4+] 0.307598 [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.