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-github-linguist-7.9.0/ext/linguist/linguist.c Examining data/ruby-github-linguist-7.9.0/ext/linguist/strndup.c Examining data/ruby-github-linguist-7.9.0/ext/linguist/lex.linguist_yy.c Examining data/ruby-github-linguist-7.9.0/ext/linguist/lex.linguist_yy.h Examining data/ruby-github-linguist-7.9.0/ext/linguist/linguist.h FINAL RESULTS: data/ruby-github-linguist-7.9.0/ext/linguist/strndup.c:6: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(copy, s1, n); data/ruby-github-linguist-7.9.0/ext/linguist/lex.linguist_yy.c:731:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ data/ruby-github-linguist-7.9.0/ext/linguist/lex.linguist_yy.c:1034: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). { feed_token(strndup(yytext, strlen(yytext) - 1), REGULAR_TOKEN); eat_until_unescaped('"'); return 1; } data/ruby-github-linguist-7.9.0/ext/linguist/lex.linguist_yy.c:1039: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). { feed_token(strndup(yytext, strlen(yytext) - 1), REGULAR_TOKEN); eat_until_unescaped('\''); return 1; } data/ruby-github-linguist-7.9.0/ext/linguist/lex.linguist_yy.c:1072: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(yytext) >= 4 && strcmp(yytext + strlen(yytext) - 2, "*/") == 0) { data/ruby-github-linguist-7.9.0/ext/linguist/lex.linguist_yy.c:1072: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). if (strlen(yytext) >= 4 && strcmp(yytext + strlen(yytext) - 2, "*/") == 0) { data/ruby-github-linguist-7.9.0/ext/linguist/lex.linguist_yy.c:1835:38: [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 linguist_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); data/ruby-github-linguist-7.9.0/ext/linguist/linguist.c:38:10: [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(extra.token); data/ruby-github-linguist-7.9.0/ext/linguist/linguist.c:44:10: [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(extra.token); data/ruby-github-linguist-7.9.0/ext/linguist/linguist.c:53:10: [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(extra.token); ANALYSIS SUMMARY: Hits = 10 Lines analyzed = 2665 in approximately 0.15 seconds (18007 lines/second) Physical Source Lines of Code (SLOC) = 1751 Hits@level = [0] 2 [1] 9 [2] 1 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 12 [1+] 10 [2+] 1 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 6.85323 [1+] 5.71102 [2+] 0.571102 [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.