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/libkeepalive-0.3/test/test.c Examining data/libkeepalive-0.3/src/libkeepalive.c FINAL RESULTS: data/libkeepalive-0.3/src/libkeepalive.c:67:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if((env = getenv("KEEPALIVE")) && !strcasecmp(env, "off")) break; data/libkeepalive-0.3/src/libkeepalive.c:74:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if((env = getenv("KEEPCNT"))) { data/libkeepalive-0.3/src/libkeepalive.c:82:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if((env = getenv("KEEPIDLE"))) { data/libkeepalive-0.3/src/libkeepalive.c:90:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if((env = getenv("KEEPINTVL"))) { data/libkeepalive-0.3/src/libkeepalive.c:75:16: [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). optval = atoi(env); data/libkeepalive-0.3/src/libkeepalive.c:83:16: [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). optval = atoi(env); data/libkeepalive-0.3/src/libkeepalive.c:91:16: [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). optval = atoi(env); ANALYSIS SUMMARY: Hits = 7 Lines analyzed = 192 in approximately 0.02 seconds (10975 lines/second) Physical Source Lines of Code (SLOC) = 98 Hits@level = [0] 4 [1] 0 [2] 3 [3] 4 [4] 0 [5] 0 Hits@level+ = [0+] 11 [1+] 7 [2+] 7 [3+] 4 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 112.245 [1+] 71.4286 [2+] 71.4286 [3+] 40.8163 [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.