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/qprint-1.1.dfsg.2/qprint.c Examining data/qprint-1.1.dfsg.2/getopt.h Examining data/qprint-1.1.dfsg.2/getopt.c FINAL RESULTS: data/qprint-1.1.dfsg.2/getopt.h:10:9: [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. #define getopt(a, b, c) Getopt(a, b, c) data/qprint-1.1.dfsg.2/qprint.c:759:6: [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. opt= getopt(argc,argv,"bdeinpu-:"); data/qprint-1.1.dfsg.2/qprint.c:148:8: [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. static char line_break[3]= {ASCII_CARRIAGE_RETURN,ASCII_LINE_FEED,0}; data/qprint-1.1.dfsg.2/qprint.c:180:8: [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. static char hex[16]= {ASCII_0,ASCII_0+1,ASCII_0+2,ASCII_0+3, data/qprint-1.1.dfsg.2/qprint.c:908:9: [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((fi= fopen(cp, data/qprint-1.1.dfsg.2/qprint.c:928:9: [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((fo= fopen(cp, data/qprint-1.1.dfsg.2/qprint.c:272:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((ch= getc(fi))!=EOF){ data/qprint-1.1.dfsg.2/qprint.c:353:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int chn= getc(fi); data/qprint-1.1.dfsg.2/qprint.c:442:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int chn= getc(fi); data/qprint-1.1.dfsg.2/qprint.c:650:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int chn= getc(fi); data/qprint-1.1.dfsg.2/qprint.c:683:5: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch= getc(fi); ANALYSIS SUMMARY: Hits = 11 Lines analyzed = 1123 in approximately 0.04 seconds (31998 lines/second) Physical Source Lines of Code (SLOC) = 715 Hits@level = [0] 33 [1] 5 [2] 4 [3] 2 [4] 0 [5] 0 Hits@level+ = [0+] 44 [1+] 11 [2+] 6 [3+] 2 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 61.5385 [1+] 15.3846 [2+] 8.39161 [3+] 2.7972 [4+] 0 [5+] 0 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.