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/xfonts-terminus-4.48/win32/ter-main.c Examining data/xfonts-terminus-4.48/win32/fcp.c FINAL RESULTS: data/xfonts-terminus-4.48/win32/fcp.c:31:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer, sizeof buffer, format, ap); data/xfonts-terminus-4.48/win32/fcp.c:36:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/xfonts-terminus-4.48/win32/fcp.c:28: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 buffer[640]; data/xfonts-terminus-4.48/win32/fcp.c:46: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 buffer[640]; data/xfonts-terminus-4.48/win32/fcp.c:84: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 s[0x80]; data/xfonts-terminus-4.48/win32/fcp.c:107:11: [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 ((f = open(name, O_RDWR | O_BINARY)) == -1) error(name); data/xfonts-terminus-4.48/win32/fcp.c:110: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). if ((p = fopen(patch, "r")) == NULL) error(patch); data/xfonts-terminus-4.48/win32/fcp.c:91:62: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (sscanf(*argv, "%lx%n", &ignore, &n) != 1 || n != (int) strlen(*argv)) fatal("%s: invalid offset", *argv); data/xfonts-terminus-4.48/win32/fcp.c:108:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((n = read(f, buffer, SIZE)) == -1) error(name); data/xfonts-terminus-4.48/win32/fcp.c:119:79: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (sscanf(s, "%lx: %x %x%n", &offset, &orig, &chng, &n) == 3 && n == (int) strlen(s)) data/xfonts-terminus-4.48/win32/fcp.c:163:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(__argv[i]) > 255) fatal("argument %d too long", i); ANALYSIS SUMMARY: Hits = 11 Lines analyzed = 176 in approximately 0.04 seconds (5025 lines/second) Physical Source Lines of Code (SLOC) = 153 Hits@level = [0] 6 [1] 4 [2] 5 [3] 0 [4] 2 [5] 0 Hits@level+ = [0+] 17 [1+] 11 [2+] 7 [3+] 2 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 111.111 [1+] 71.8954 [2+] 45.7516 [3+] 13.0719 [4+] 13.0719 [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.