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/asmon-0.71/wmgeneral/list.c
Examining data/asmon-0.71/wmgeneral/list.h
Examining data/asmon-0.71/wmgeneral/misc.h
Examining data/asmon-0.71/wmgeneral/misc.c
Examining data/asmon-0.71/wmgeneral/wmgeneral.c
Examining data/asmon-0.71/wmgeneral/wmgeneral.h
Examining data/asmon-0.71/asmon/solaris26.c
Examining data/asmon-0.71/asmon/asmon.c

FINAL RESULTS:

data/asmon-0.71/asmon/asmon.c:250:23:  [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.
				if (Command[ 0 ]) system(Command);
data/asmon-0.71/wmgeneral/misc.c:160:9:  [4] (shell) execvp:
  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.
        execvp(argv[0], args);
data/asmon-0.71/asmon/asmon.c:58:1:  [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 Command[256]="";
data/asmon-0.71/asmon/asmon.c:112:6:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
					strcat( Command, " &"); 
data/asmon-0.71/asmon/asmon.c:139:17:  [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("/var/run/server.0.pid", "r")) != NULL)
data/asmon-0.71/asmon/asmon.c:144: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 ( (fp = fopen("/tmp/.X0-lock", "r")) != NULL)
data/asmon-0.71/asmon/asmon.c:349: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[128];
data/asmon-0.71/asmon/asmon.c:352: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( (fp = fopen("/proc/stat", "r")) != NULL)
data/asmon-0.71/asmon/asmon.c:362:20:  [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/vmstat", "r")) != NULL)
data/asmon-0.71/asmon/asmon.c:484:15:  [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/loadavg", "r")) != NULL)
data/asmon-0.71/asmon/asmon.c:609:15:  [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/meminfo", "r")) != NULL)
data/asmon-0.71/asmon/asmon.c:612: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 junk[128];
data/asmon-0.71/asmon/asmon.c:746:5:  [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[128], XFileName[256];
data/asmon-0.71/asmon/asmon.c:750: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(XFileName, "/proc/%d/status", Xpid);
data/asmon-0.71/asmon/asmon.c:752:15:  [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(XFileName, "r")) != NULL)
data/asmon-0.71/asmon/asmon.c:807: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( (fp = fopen("/proc/uptime", "r")) != NULL)
data/asmon-0.71/asmon/solaris26.c:81:12:  [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         buf[256];
data/asmon-0.71/wmgeneral/wmgeneral.c:87: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	temp[128];
data/asmon-0.71/wmgeneral/wmgeneral.c:92:7:  [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).
	fp = fopen(filename, "r");
data/asmon-0.71/asmon/asmon.c:95:6:  [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).
	if (strlen(ProgName) >= 5)
data/asmon-0.71/asmon/asmon.c:96:16:  [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).
		ProgName += (strlen(ProgName) - 5);
data/asmon-0.71/asmon/asmon.c:111:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy( Command, argv[i], 253);
data/asmon-0.71/asmon/asmon.c:265:9:  [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(150000);
data/asmon-0.71/wmgeneral/misc.c:65:22:  [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).
    t = ret = malloc(strlen(word)+1);
data/asmon-0.71/wmgeneral/wmgeneral.c:98:11:  [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).
					p += strlen(keys[key].label);

ANALYSIS SUMMARY:

Hits = 25
Lines analyzed = 1953 in approximately 0.07 seconds (27415 lines/second)
Physical Source Lines of Code (SLOC) = 1368
Hits@level = [0]  43 [1]   6 [2]  17 [3]   0 [4]   2 [5]   0
Hits@level+ = [0+]  68 [1+]  25 [2+]  19 [3+]   2 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 49.7076 [1+] 18.2749 [2+] 13.8889 [3+] 1.46199 [4+] 1.46199 [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.