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/bdf2sfd-1.1.5/compat/compat.h Examining data/bdf2sfd-1.1.5/compat/pledge.c Examining data/bdf2sfd-1.1.5/compat/pledge.h Examining data/bdf2sfd-1.1.5/compat/strtonum.c Examining data/bdf2sfd-1.1.5/compat/strtonum.h Examining data/bdf2sfd-1.1.5/src/bdf2sfd.c Examining data/bdf2sfd-1.1.5/src/config.h Examining data/bdf2sfd-1.1.5/src/header.c Examining data/bdf2sfd-1.1.5/src/header.h Examining data/bdf2sfd-1.1.5/src/parse.c Examining data/bdf2sfd-1.1.5/src/parse.h Examining data/bdf2sfd-1.1.5/src/polygon.c Examining data/bdf2sfd-1.1.5/src/polygon.h Examining data/bdf2sfd-1.1.5/src/seccomp.h FINAL RESULTS: data/bdf2sfd-1.1.5/src/bdf2sfd.c:106:23: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((getoptFlag = getopt(argc, argv, "f:p:hv")) != -1) { data/bdf2sfd-1.1.5/src/bdf2sfd.c:40: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 lineBuffer[LINE_LENGTH_MAX]; data/bdf2sfd-1.1.5/src/bdf2sfd.c:145:19: [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). if (!(bdfFile = fopen(intputFile, "r"))) { data/bdf2sfd-1.1.5/src/seccomp.h:60:24: [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). BDF2SFD_SYSCALL_ALLOW(open), data/bdf2sfd-1.1.5/src/seccomp.h:63:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). BDF2SFD_SYSCALL_ALLOW(read), ANALYSIS SUMMARY: Hits = 5 Lines analyzed = 783 in approximately 0.05 seconds (14751 lines/second) Physical Source Lines of Code (SLOC) = 512 Hits@level = [0] 23 [1] 1 [2] 3 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 28 [1+] 5 [2+] 4 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 54.6875 [1+] 9.76562 [2+] 7.8125 [3+] 1.95312 [4+] 0 [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.