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/flog-1.8+orig/flog.c FINAL RESULTS: data/flog-1.8+orig/flog.c:88:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). conf.max_len = atoi (argv[opt]); data/flog-1.8+orig/flog.c:120: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 ((pid_fd = fopen(conf.pidfile_name, "w")) == NULL) { data/flog-1.8+orig/flog.c:131:20: [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 ((fifo_fd = open(fifo_name, O_RDONLY)) < 0) { data/flog-1.8+orig/flog.c:161:22: [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 ((fifo_fd = open(fifo_name, O_RDONLY)) < 0) { data/flog-1.8+orig/flog.c:194:6: [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 str[256]; data/flog-1.8+orig/flog.c:213:4: [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 str[256]; data/flog-1.8+orig/flog.c:256:10: [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). fd = open (file->name, O_CREAT|O_APPEND|O_WRONLY|O_LARGEFILE, 0666); data/flog-1.8+orig/flog.c:258:10: [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). fd = open (file->name, O_CREAT|O_APPEND|O_WRONLY, 0666); data/flog-1.8+orig/flog.c:316:3: [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 str[256]; data/flog-1.8+orig/flog.c:333:10: [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 buf[100]; data/flog-1.8+orig/flog.c:339:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (prepend_to-len, buf, len); data/flog-1.8+orig/flog.c:156:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size = read(fifo_fd, buf.data + buf.used, buf.size - buf.used); ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 351 in approximately 0.05 seconds (6581 lines/second) Physical Source Lines of Code (SLOC) = 275 Hits@level = [0] 14 [1] 1 [2] 11 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 26 [1+] 12 [2+] 11 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 94.5455 [1+] 43.6364 [2+] 40 [3+] 0 [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.