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/falselogin-0.3/falselogin.c FINAL RESULTS: data/falselogin-0.3/falselogin.c:45: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_mail[MAIL_LEN]; // length of mail number data/falselogin-0.3/falselogin.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 *temp, host_n[MAXLEN_HOSTNAME], data/falselogin-0.3/falselogin.c:74: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 ((f = fopen (CONFIG_FILE, "rt")) == NULL) { data/falselogin-0.3/falselogin.c:109:15: [2] (integer) atol: 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). else if ( atol(temp+5) > 0 ) data/falselogin-0.3/falselogin.c:110:13: [2] (integer) atol: 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). wait = atol(temp+5); data/falselogin-0.3/falselogin.c:147:14: [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 ((g = fopen ("/etc/debian_version", "rt")) != NULL) { data/falselogin-0.3/falselogin.c:175:14: [2] (integer) atol: 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). else if ( atol(argv[2]) > 0 ) data/falselogin-0.3/falselogin.c:176:12: [2] (integer) atol: 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). wait = atol(argv[2]); data/falselogin-0.3/falselogin.c:198:16: [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. int countMail (char userName[MAXLEN_USERNAME]) { data/falselogin-0.3/falselogin.c:206:12: [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 ( (f = fopen (temp, "rt")) != NULL) { data/falselogin-0.3/falselogin.c:149:30: [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 (*deb_ver && deb_ver[strlen(deb_ver)-1] == '\n') data/falselogin-0.3/falselogin.c:150:15: [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). deb_ver[strlen(deb_ver)-1] = 0; data/falselogin-0.3/falselogin.c:192:10: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (getchar() != '\n'); data/falselogin-0.3/falselogin.c:209:40: [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 (!strncasecmp (temp, MESSAGE_ID, strlen (MESSAGE_ID))) ANALYSIS SUMMARY: Hits = 14 Lines analyzed = 216 in approximately 0.03 seconds (7844 lines/second) Physical Source Lines of Code (SLOC) = 125 Hits@level = [0] 5 [1] 4 [2] 10 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 19 [1+] 14 [2+] 10 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 152 [1+] 112 [2+] 80 [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.