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/trend-1.4/src/color.cc Examining data/trend-1.4/src/trend.cc Examining data/trend-1.4/src/version.h FINAL RESULTS: data/trend-1.4/src/trend.cc:1968:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while((arg = getopt(argc, argv, "dDSsvlmFgG:ht:A:E:R:I:M:N:T:L:irz:f:c:p:u:e")) != -1) data/trend-1.4/src/trend.cc:50:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. using std::memcpy; data/trend-1.4/src/trend.cc:290: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 buf[Trend::maxNumLen]; data/trend-1.4/src/trend.cc:388:22: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). in = (*fileName? fopen(fileName, "r"): stdin); data/trend-1.4/src/trend.cc:1139: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[256]; data/trend-1.4/src/trend.cc:1173: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[256]; data/trend-1.4/src/trend.cc:1183: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[256]; data/trend-1.4/src/trend.cc:1207: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[256]; data/trend-1.4/src/trend.cc:1275: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[256]; data/trend-1.4/src/trend.cc:2187: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[Trend::maxNumLen]; data/trend-1.4/src/trend.cc:2215:7: [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(gi->lineCol, Trend::lineCol[n % maxLineCol], sizeof(GLfloat[3])); data/trend-1.4/src/trend.cc:51:12: [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). using std::strlen; ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 2294 in approximately 0.06 seconds (38511 lines/second) Physical Source Lines of Code (SLOC) = 1687 Hits@level = [0] 11 [1] 1 [2] 10 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 23 [1+] 12 [2+] 11 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 13.6337 [1+] 7.11322 [2+] 6.52045 [3+] 0.592768 [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.