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/pcf2bdf-1.05/pcf2bdf.cc FINAL RESULTS: data/pcf2bdf-1.05/pcf2bdf.cc:15:11: [4] (shell) popen: 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. # define popen _popen data/pcf2bdf-1.05/pcf2bdf.cc:600:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "gzip -dc %s", ifilename); // TODO data/pcf2bdf-1.05/pcf2bdf.cc:601:11: [4] (shell) popen: 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. ifp = popen(buf, "r"); data/pcf2bdf-1.05/pcf2bdf.cc:583:11: [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). ifp = fopen(ifilename, "rb"); data/pcf2bdf-1.05/pcf2bdf.cc:599: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[1024]; data/pcf2bdf-1.05/pcf2bdf.cc:610:11: [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). ofp = fopen(ofilename, "wb"); data/pcf2bdf-1.05/pcf2bdf.cc:249:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int a = fgetc(ifp); ANALYSIS SUMMARY: Hits = 7 Lines analyzed = 990 in approximately 0.03 seconds (29066 lines/second) Physical Source Lines of Code (SLOC) = 828 Hits@level = [0] 78 [1] 1 [2] 3 [3] 0 [4] 3 [5] 0 Hits@level+ = [0+] 85 [1+] 7 [2+] 6 [3+] 3 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 102.657 [1+] 8.45411 [2+] 7.24638 [3+] 3.62319 [4+] 3.62319 [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.