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/kcheckers-0.8.1/history.h Examining data/kcheckers-0.8.1/checkers.cc Examining data/kcheckers-0.8.1/checkers.h Examining data/kcheckers-0.8.1/computerplayer.cc Examining data/kcheckers-0.8.1/computerplayer.h Examining data/kcheckers-0.8.1/echeckers.cc Examining data/kcheckers-0.8.1/echeckers.h Examining data/kcheckers-0.8.1/field.cc Examining data/kcheckers-0.8.1/field.h Examining data/kcheckers-0.8.1/humanplayer.cc Examining data/kcheckers-0.8.1/humanplayer.h Examining data/kcheckers-0.8.1/newgamedlg.cc Examining data/kcheckers-0.8.1/newgamedlg.h Examining data/kcheckers-0.8.1/pdn.h Examining data/kcheckers-0.8.1/player.h Examining data/kcheckers-0.8.1/rcheckers.cc Examining data/kcheckers-0.8.1/rcheckers.h Examining data/kcheckers-0.8.1/toplevel.cc Examining data/kcheckers-0.8.1/toplevel.h Examining data/kcheckers-0.8.1/view.cc Examining data/kcheckers-0.8.1/view.h Examining data/kcheckers-0.8.1/board.cc Examining data/kcheckers-0.8.1/board.h Examining data/kcheckers-0.8.1/history.cc Examining data/kcheckers-0.8.1/main.cc Examining data/kcheckers-0.8.1/pdn.cc Examining data/kcheckers-0.8.1/common.h FINAL RESULTS: data/kcheckers-0.8.1/checkers.cc:430:23: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. str += QString("").sprintf("%.2u", fields[i]); data/kcheckers-0.8.1/main.cc:18:32: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. << "Your Locale:" << QLocale::system().name() << endl data/kcheckers-0.8.1/main.cc:23:36: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if(qt_tr.load("qt_" + QLocale::system().name())) data/kcheckers-0.8.1/main.cc:30:44: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if(app_tr.load("kcheckers_" + QLocale::system().name(), data/kcheckers-0.8.1/checkers.cc:78:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(0)); // Seed the random number generator data/kcheckers-0.8.1/newgamedlg.cc:299:5: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. getenv("USER")).toString()); data/kcheckers-0.8.1/history.cc:304:13: [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). if(!m_pdn->open(filename, this, tr("Reading file..."), log_text)) { data/kcheckers-0.8.1/pdn.cc:49:11: [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). bool Pdn::open(const QString& filename, QWidget* parent, data/kcheckers-0.8.1/pdn.cc:56:11: [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). if(!file.open(QFile::ReadOnly)) return false; data/kcheckers-0.8.1/pdn.cc:123:11: [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). if(!file.open(QFile::WriteOnly)) data/kcheckers-0.8.1/pdn.h:54:10: [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). bool open(const QString& filename, QWidget* parent, data/kcheckers-0.8.1/toplevel.cc:418:3: [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). open(fn); data/kcheckers-0.8.1/toplevel.cc:422:18: [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). void myTopLevel::open(const QString& fn) data/kcheckers-0.8.1/toplevel.h:41:10: [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). void open(const QString& filename); ANALYSIS SUMMARY: Hits = 14 Lines analyzed = 6001 in approximately 0.15 seconds (39283 lines/second) Physical Source Lines of Code (SLOC) = 3856 Hits@level = [0] 0 [1] 0 [2] 8 [3] 2 [4] 4 [5] 0 Hits@level+ = [0+] 14 [1+] 14 [2+] 14 [3+] 6 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 3.63071 [1+] 3.63071 [2+] 3.63071 [3+] 1.55602 [4+] 1.03734 [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.