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/comptext-1.0.1/src/comp_txt.cxx Examining data/comptext-1.0.1/src/comp_ui.cxx Examining data/comptext-1.0.1/src/comptext_icon.cxx Examining data/comptext-1.0.1/src/include/comp_txt.h Examining data/comptext-1.0.1/src/include/comp_ui.h Examining data/comptext-1.0.1/src/include/comptextrc.h Examining data/comptext-1.0.1/src/main.cxx FINAL RESULTS: data/comptext-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/comptext-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/comptext-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, "comptext %s", comptext_VERSION); data/comptext-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/comptext-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/comptext-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/comptext-1.0.1/src/comp_txt.cxx:23: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/comptext-1.0.1/src/comp_txt.cxx:31: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/comptext-1.0.1/src/comp_txt.cxx:45: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/comptext-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/comptext-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 = 11 Lines analyzed = 939 in approximately 0.10 seconds (9627 lines/second) Physical Source Lines of Code (SLOC) = 829 Hits@level = [0] 3 [1] 0 [2] 5 [3] 3 [4] 3 [5] 0 Hits@level+ = [0+] 14 [1+] 11 [2+] 11 [3+] 6 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 16.8878 [1+] 13.269 [2+] 13.269 [3+] 7.23764 [4+] 3.61882 [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.