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/xsysinfo-1.7/BarGauge.c
Examining data/xsysinfo-1.7/BarGauge.h
Examining data/xsysinfo-1.7/BarGaugeP.h
Examining data/xsysinfo-1.7/sysinfo.c
Examining data/xsysinfo-1.7/sysinfo.h
Examining data/xsysinfo-1.7/xsysinfo.c

FINAL RESULTS:

data/xsysinfo-1.7/sysinfo.c:175:31:  [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.
		&curr_load.nice, &curr_load.system, &curr_load.idle );
data/xsysinfo-1.7/sysinfo.c:182:47:  [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.
	result->system = curr_load.system - loadptr->system;
data/xsysinfo-1.7/sysinfo.c:187:30:  [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.
	loadptr->system = curr_load.system;
data/xsysinfo-1.7/sysinfo.h:32: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.
	unsigned long system;
data/xsysinfo-1.7/xsysinfo.c:123:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(load.cpu, (char *)client_data);
data/xsysinfo-1.7/xsysinfo.c:127:31:  [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.
	gauge->values[1] = norm(load.system, load.total);
data/xsysinfo-1.7/sysinfo.c:36:8:  [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.
static char buffer[1024];
data/xsysinfo-1.7/sysinfo.c:193:20:  [2] (misc) open:
  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 ((meminfo_fd = open("/proc/meminfo",O_RDONLY)) < 0) {
data/xsysinfo-1.7/sysinfo.c:197:20:  [2] (misc) open:
  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 ((loadavg_fd = open("/proc/loadavg",O_RDONLY)) < 0) {
data/xsysinfo-1.7/sysinfo.c:201:17:  [2] (misc) open:
  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 ((load_fd = open("/proc/stat",O_RDONLY)) < 0) {
data/xsysinfo-1.7/sysinfo.c:206:13:  [2] (misc) open:
  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).
	swaps_fd = open("/proc/swaps",O_RDONLY);
data/xsysinfo-1.7/sysinfo.c:214: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 cpu_num[7];
data/xsysinfo-1.7/sysinfo.c:222:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(cpu_num,"cpu%d ", count);
data/xsysinfo-1.7/xsysinfo.c:259:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf(bufptr, "cpu ");
data/xsysinfo-1.7/xsysinfo.c:270:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
				sprintf(bufptr, "cpu%d ", i);
data/xsysinfo-1.7/sysinfo.c:41:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	     read( fd, buffer, sizeof(buffer) - 1 ) > 0 )
data/xsysinfo-1.7/sysinfo.c:50:20:  [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).
	int retval, len = strlen(tag);

ANALYSIS SUMMARY:

Hits = 17
Lines analyzed = 1244 in approximately 0.04 seconds (28537 lines/second)
Physical Source Lines of Code (SLOC) = 787
Hits@level = [0]  21 [1]   2 [2]   9 [3]   0 [4]   6 [5]   0
Hits@level+ = [0+]  38 [1+]  17 [2+]  15 [3+]   6 [4+]   6 [5+]   0
Hits/KSLOC@level+ = [0+] 48.2846 [1+] 21.601 [2+] 19.0597 [3+] 7.62389 [4+] 7.62389 [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.