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/gpw-0.0.19940601/gpw.c Examining data/gpw-0.0.19940601/loadtris.c FINAL RESULTS: data/gpw-0.0.19940601/gpw.c:78:9: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. pik = drand48 (); /* random number [0,1] */ data/gpw-0.0.19940601/gpw.c:113:10: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. pik = drand48 (); data/gpw-0.0.19940601/gpw.c:48: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 password[100]; /* buffer to develop a password */ data/gpw-0.0.19940601/gpw.c:60: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). n_passwords = atoi (&argv[1][0]); data/gpw-0.0.19940601/gpw.c:62:22: [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). password_length = atoi (&argv[2][0]); data/gpw-0.0.19940601/loadtris.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 buf[100]; data/gpw-0.0.19940601/loadtris.c:50: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 s1[2], s2[2], s3[2]; data/gpw-0.0.19940601/loadtris.c:72:13: [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 ((fp = fopen (argv[argno], "r")) == NULL) { ANALYSIS SUMMARY: Hits = 8 Lines analyzed = 293 in approximately 0.03 seconds (11490 lines/second) Physical Source Lines of Code (SLOC) = 220 Hits@level = [0] 27 [1] 0 [2] 6 [3] 2 [4] 0 [5] 0 Hits@level+ = [0+] 35 [1+] 8 [2+] 8 [3+] 2 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 159.091 [1+] 36.3636 [2+] 36.3636 [3+] 9.09091 [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.