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/wmcpuload-1.1.1/src/cpu_cygwin.c
Examining data/wmcpuload-1.1.1/src/cpu_irix.c
Examining data/wmcpuload-1.1.1/src/cpu_netbsd.c
Examining data/wmcpuload-1.1.1/src/cpu_freebsd.c
Examining data/wmcpuload-1.1.1/src/main.c
Examining data/wmcpuload-1.1.1/src/cpu_bsdi.c
Examining data/wmcpuload-1.1.1/src/cpu_openbsd.c
Examining data/wmcpuload-1.1.1/src/cpu.h
Examining data/wmcpuload-1.1.1/src/cpu_solaris.c
Examining data/wmcpuload-1.1.1/src/cpu_darwin.c
Examining data/wmcpuload-1.1.1/src/cpu_linux.c
Examining data/wmcpuload-1.1.1/libdockapp/dockapp.c
Examining data/wmcpuload-1.1.1/libdockapp/dockapp.h

FINAL RESULTS:

data/wmcpuload-1.1.1/src/cpu_linux.c:76:33:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	unsigned long long user, nice, system, idle, iowait, irq, softirq;
data/wmcpuload-1.1.1/src/cpu_linux.c:91:26:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
			       &user, &nice, &system, &idle, &iowait,
data/wmcpuload-1.1.1/src/cpu_linux.c:95:26:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
			       &user, &nice, &system, &idle);
data/wmcpuload-1.1.1/src/cpu_linux.c:104:4:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
			fscanf(fp, "%s  %llu %llu %llu %llu %llu %llu %llu",
data/wmcpuload-1.1.1/src/cpu_linux.c:105:36:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
			       cpu_name, &user, &nice, &system, &idle, &iowait,
data/wmcpuload-1.1.1/src/cpu_linux.c:108:4:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
			fscanf(fp, "%s  %llu %llu %llu %llu",
data/wmcpuload-1.1.1/src/cpu_linux.c:109:36:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
			       cpu_name, &user, &nice, &system,
data/wmcpuload-1.1.1/src/cpu_linux.c:121:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	used = user + system;
data/wmcpuload-1.1.1/src/cpu_cygwin.c:152:20:  [3] (misc) LoadLibraryEx:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
    if ((h_ntdll = LoadLibraryEx("NTDLL.DLL", NULL, 0)) == NULL) {
data/wmcpuload-1.1.1/src/cpu_linux.c:59: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("/proc/stat", "r"))) {
data/wmcpuload-1.1.1/src/cpu_linux.c:82: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("/proc/stat", "r"))) {
data/wmcpuload-1.1.1/src/cpu_linux.c:97:3:  [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 cpu_name[20];
data/wmcpuload-1.1.1/src/cpu_linux.c:49:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((c = fgetc(fp)) != '\n')

ANALYSIS SUMMARY:

Hits = 13
Lines analyzed = 1934 in approximately 0.08 seconds (24858 lines/second)
Physical Source Lines of Code (SLOC) = 1359
Hits@level = [0]  48 [1]   1 [2]   3 [3]   1 [4]   8 [5]   0
Hits@level+ = [0+]  61 [1+]  13 [2+]  12 [3+]   9 [4+]   8 [5+]   0
Hits/KSLOC@level+ = [0+] 44.8859 [1+] 9.56586 [2+] 8.83002 [3+] 6.62252 [4+] 5.88668 [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.