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/poppassd-1.8.5/poppassd.c FINAL RESULTS: data/poppassd-1.8.5/poppassd.c:98: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 (stdout, fmt, ap); data/poppassd-1.8.5/poppassd.c:86:1: [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 oldpass[BUFSIZE]; data/poppassd-1.8.5/poppassd.c:87:1: [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 newpass[BUFSIZE]; data/poppassd-1.8.5/poppassd.c:176: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 line[BUFSIZE]; data/poppassd-1.8.5/poppassd.c:177: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 user[BUFSIZE]; data/poppassd-1.8.5/poppassd.c:178: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 emess[BUFSIZE]; data/poppassd-1.8.5/poppassd.c:195:25: [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). if( strlen(line) > atoi(MAX_LEN_USERNAME) ) { data/poppassd-1.8.5/poppassd.c:196:54: [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). WriteToClient ("500 Username too long (max %d).", atoi(MAX_LEN_USERNAME)); data/poppassd-1.8.5/poppassd.c:213:25: [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). if( strlen(line) > atoi(MAX_LEN_PASS) ) data/poppassd-1.8.5/poppassd.c:216:9: [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). atoi(MAX_LEN_PASS) ); data/poppassd-1.8.5/poppassd.c:195:10: [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(line) > atoi(MAX_LEN_USERNAME) ) { data/poppassd-1.8.5/poppassd.c:200:10: [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 (user) == 0 ) data/poppassd-1.8.5/poppassd.c:213:10: [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(line) > atoi(MAX_LEN_PASS) ) data/poppassd-1.8.5/poppassd.c:220:9: [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(oldpass) == 0) data/poppassd-1.8.5/poppassd.c:249:10: [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 (newpass) == 0) ANALYSIS SUMMARY: Hits = 15 Lines analyzed = 273 in approximately 0.04 seconds (7425 lines/second) Physical Source Lines of Code (SLOC) = 191 Hits@level = [0] 8 [1] 5 [2] 9 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 23 [1+] 15 [2+] 10 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 120.419 [1+] 78.534 [2+] 52.356 [3+] 5.2356 [4+] 5.2356 [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.