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/ruby-curses-1.2.4/ext/curses/curses.c FINAL RESULTS: data/ruby-curses-1.2.4/ext/curses/curses.c:737: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 rtn[GETSTR_BUF_SIZE]; data/ruby-curses-1.2.4/ext/curses/curses.c:2216: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 rtn[GETSTR_BUF_SIZE]; data/ruby-curses-1.2.4/ext/curses/curses.c:3967: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 c[8]; data/ruby-curses-1.2.4/ext/curses/curses.c:3969:6: [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(c, "KEY_F%d", i); data/ruby-curses-1.2.4/ext/curses/curses.c:3971:6: [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(c, "F%d", i); data/ruby-curses-1.2.4/ext/curses/curses.c:741: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). return rb_external_str_new_with_enc(rtn, strlen(rtn), keyboard_encoding); data/ruby-curses-1.2.4/ext/curses/curses.c:2246:50: [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). return rb_external_str_new_with_enc(arg.rtn, strlen(arg.rtn), ANALYSIS SUMMARY: Hits = 7 Lines analyzed = 4858 in approximately 0.10 seconds (50740 lines/second) Physical Source Lines of Code (SLOC) = 2394 Hits@level = [0] 0 [1] 2 [2] 5 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 7 [1+] 7 [2+] 5 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 2.92398 [1+] 2.92398 [2+] 2.08855 [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.