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/dirdiff-2.1/filecmp.c FINAL RESULTS: data/dirdiff-2.1/filecmp.c:19:26: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define memmove(t, f, n) bcopy(f, t, n) data/dirdiff-2.1/filecmp.c:270:15: [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). if ((f1 = open(argv[fi], O_RDONLY)) == -1) { data/dirdiff-2.1/filecmp.c:275:15: [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). if ((f2 = open(argv[fi+1], O_RDONLY)) == -1) { data/dirdiff-2.1/filecmp.c:344:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(interp->result, "%d", same); data/dirdiff-2.1/filecmp.c:293:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n1 = read(f1, b1 + k1, BSIZE - k1); data/dirdiff-2.1/filecmp.c:305:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n2 = read(f2, b2 + k2, BSIZE - k2); ANALYSIS SUMMARY: Hits = 6 Lines analyzed = 354 in approximately 0.04 seconds (9727 lines/second) Physical Source Lines of Code (SLOC) = 305 Hits@level = [0] 0 [1] 2 [2] 4 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 6 [1+] 6 [2+] 4 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 19.6721 [1+] 19.6721 [2+] 13.1148 [3+] 0 [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.