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/comptty-1.0.1/src/comp_tty.cxx Examining data/comptty-1.0.1/src/comp_ui.cxx Examining data/comptty-1.0.1/src/comptty_icon.cxx Examining data/comptty-1.0.1/src/include/comp_tty.h Examining data/comptty-1.0.1/src/include/comp_ui.h Examining data/comptty-1.0.1/src/include/compttyrc.h Examining data/comptty-1.0.1/src/main.cxx FINAL RESULTS: data/comptty-1.0.1/src/main.cxx:123:5: [4] (shell) execlp: 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. execlp(browsers[i], browsers[i], url, (char*)0); data/comptty-1.0.1/src/main.cxx:139:11: [4] (shell) ShellExecute: 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 ((int)ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL) <= 32) data/comptty-1.0.1/src/main.cxx:162:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (title, "comptty %s", comptty_VERSION); data/comptty-1.0.1/src/main.cxx:103:3: [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("FLDIGI_BROWSER"), // valid for any OS - set by user data/comptty-1.0.1/src/main.cxx:108:3: [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("FLDIGI_BROWSER"), // force use of spec'd browser data/comptty-1.0.1/src/main.cxx:109:3: [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("BROWSER"), // most Linux distributions data/comptty-1.0.1/src/comp_tty.cxx:14:10: [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. unsigned char BaudotTable[256]; data/comptty-1.0.1/src/comp_tty.cxx:85:5: [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). f1.open(ref_file.c_str(), ios::binary); data/comptty-1.0.1/src/comp_tty.cxx:94:5: [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). f2.open(comp_file.c_str(), ios::binary); data/comptty-1.0.1/src/comp_tty.cxx:109: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 temp[200]; data/comptty-1.0.1/src/main.cxx:88:1: [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 title[50]; data/comptty-1.0.1/src/main.cxx:89:1: [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 progdir[80]; ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 1003 in approximately 0.09 seconds (11226 lines/second) Physical Source Lines of Code (SLOC) = 867 Hits@level = [0] 4 [1] 0 [2] 6 [3] 3 [4] 3 [5] 0 Hits@level+ = [0+] 16 [1+] 12 [2+] 12 [3+] 6 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 18.4544 [1+] 13.8408 [2+] 13.8408 [3+] 6.92042 [4+] 3.46021 [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.