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/scythestat-1.0.3/scythestat/rng/rtmvnorm.h Examining data/scythestat-1.0.3/scythestat/rng/mersenne.h Examining data/scythestat-1.0.3/scythestat/rng/lecuyer.h Examining data/scythestat-1.0.3/scythestat/rng/wrapped_generator.h Examining data/scythestat-1.0.3/scythestat/matrix.h Examining data/scythestat-1.0.3/scythestat/datablock.h Examining data/scythestat-1.0.3/scythestat/matrix_bidirectional_iterator.h Examining data/scythestat-1.0.3/scythestat/algorithm.h Examining data/scythestat-1.0.3/scythestat/rng.h Examining data/scythestat-1.0.3/scythestat/optimize.h Examining data/scythestat-1.0.3/scythestat/la.h Examining data/scythestat-1.0.3/scythestat/ide.h Examining data/scythestat-1.0.3/scythestat/defs.h Examining data/scythestat-1.0.3/scythestat/matrix_random_access_iterator.h Examining data/scythestat-1.0.3/scythestat/error.h Examining data/scythestat-1.0.3/scythestat/smath.h Examining data/scythestat-1.0.3/scythestat/distributions.h Examining data/scythestat-1.0.3/scythestat/stat.h Examining data/scythestat-1.0.3/scythestat/lapack.h Examining data/scythestat-1.0.3/scythestat/matrix_forward_iterator.h FINAL RESULTS: data/scythestat-1.0.3/scythestat/error.h:267:12: [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). std::strcpy(retval, os.str().c_str()); data/scythestat-1.0.3/scythestat/ide.h:1702: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 getvecs[1]; // are we getting eigenvectors? data/scythestat-1.0.3/scythestat/ide.h:1780: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 leftvecs[1], rightvecs[1]; data/scythestat-1.0.3/scythestat/matrix.h:3190:17: [2] (misc) open: 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). out.open(path.c_str(), std::ios::out); data/scythestat-1.0.3/scythestat/matrix.h:3197:15: [2] (misc) open: 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). out.open(path.c_str(), std::ios::out | std::ios::trunc); data/scythestat-1.0.3/scythestat/matrix.h:3199:15: [2] (misc) open: 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). out.open(path.c_str(), std::ios::out | std::ios::app); data/scythestat-1.0.3/scythestat/matrix.h:3113:21: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. return std::equal(begin_f(), end_f(), ANALYSIS SUMMARY: Hits = 7 Lines analyzed = 19162 in approximately 0.57 seconds (33474 lines/second) Physical Source Lines of Code (SLOC) = 8207 Hits@level = [0] 0 [1] 1 [2] 5 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 7 [1+] 7 [2+] 6 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 0.85293 [1+] 0.85293 [2+] 0.731083 [3+] 0.121847 [4+] 0.121847 [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.