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/wmcore-0.0.4/wmcore.c FINAL RESULTS: data/wmcore-0.0.4/wmcore.c:89: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 tmp[200]; data/wmcore-0.0.4/wmcore.c:99:12: [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). delay = atoi(argv[c]); data/wmcore-0.0.4/wmcore.c:116: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((in = fopen("/proc/stat","r")) == NULL) data/wmcore-0.0.4/wmcore.c:160: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((in = fopen("/proc/stat","r")) == NULL) data/wmcore-0.0.4/wmcore.c:169:26: [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). curr_user[cpu] = atoi(strtok(NULL," ")); data/wmcore-0.0.4/wmcore.c:170:26: [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). curr_nice[cpu] = atoi(strtok(NULL," ")); data/wmcore-0.0.4/wmcore.c:171:26: [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). curr_syst[cpu] = atoi(strtok(NULL," ")); data/wmcore-0.0.4/wmcore.c:172:26: [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). curr_idle[cpu] = atoi(strtok(NULL," ")); data/wmcore-0.0.4/wmcore.c:212:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(delay); ANALYSIS SUMMARY: Hits = 9 Lines analyzed = 215 in approximately 0.02 seconds (12613 lines/second) Physical Source Lines of Code (SLOC) = 136 Hits@level = [0] 7 [1] 1 [2] 8 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 16 [1+] 9 [2+] 8 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 117.647 [1+] 66.1765 [2+] 58.8235 [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.