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/nmon-16m+debian/lmon16m.c
Parsing failed to find end of parameter list; semicolon terminated it in (fp,
					"TOP,%07d,%s,%.2f,%.2f,%.2f,%lu,%lu,%lu,%lu,%lu,%d,%d,%s\n",
#else
				fprintf(fp,
					"TOP,%07d,%s,%.2f,%.2f,%.2f,%lu,%lu,%lu,%lu,%lu,%d,%d,%s,%ld,%llu\n",
#endif
					/* 1 */ p->procs[i].

FINAL RESULTS:

data/nmon-16m+debian/lmon16m.c:307:11:  [4] (shell) popen:
  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.
    pop = popen("/usr/bin/lscpu 2>/dev/null", "r");
data/nmon-16m+debian/lmon16m.c:326:3:  [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(lscpu.arch, &tmpstr[data_col]);
data/nmon-16m+debian/lmon16m.c:330:3:  [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(lscpu.byte_order, &tmpstr[data_col]);
data/nmon-16m+debian/lmon16m.c:349:3:  [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(lscpu.cpu_online, &tmpstr[data_col]);
data/nmon-16m+debian/lmon16m.c:356:3:  [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(lscpu.cpu_offline, &tmpstr[data_col]);
data/nmon-16m+debian/lmon16m.c:360:3:  [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(lscpu.model, &tmpstr[data_col]);
data/nmon-16m+debian/lmon16m.c:364:3:  [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(lscpu.model_name, &tmpstr[data_col]);
data/nmon-16m+debian/lmon16m.c:714:11:  [4] (shell) popen:
  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.
    pop = popen("cat /etc/os-release 2>/dev/null", "r");
data/nmon-16m+debian/lmon16m.c:716:11:  [4] (shell) popen:
  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.
    pop = popen("cat /etc/*ease 2>/dev/null", "r");
data/nmon-16m+debian/lmon16m.c:725:6:  [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(easy[i], tmpstr);
data/nmon-16m+debian/lmon16m.c:729:11:  [4] (shell) popen:
  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.
    pop = popen("/usr/bin/lsb_release -idrc 2>/dev/null", "r");
data/nmon-16m+debian/lmon16m.c:737:6:  [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(lsb_release[i], tmpstr);
data/nmon-16m+debian/lmon16m.c:772:11:  [4] (shell) popen:
  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.
    pop = popen(tmpstr, "r");
data/nmon-16m+debian/lmon16m.c:827:11:  [4] (shell) popen:
  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.
    pop = popen("ps -eo pid,args 2>/dev/null", "r");
data/nmon-16m+debian/lmon16m.c:846:6:  [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(arglist[i].args, &tmpstr[6]);
data/nmon-16m+debian/lmon16m.c:876:11:  [4] (shell) popen:
  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.
    pop = popen(cmd, "r");
data/nmon-16m+debian/lmon16m.c:1335:5:  [4] (buffer) sscanf:
  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.
    sscanf(str, "lparcfg %s", lparcfg.version_string);
data/nmon-16m+debian/lmon16m.c:1337:5:  [4] (buffer) sscanf:
  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.
    sscanf(str, "serial_number=%s", lparcfg.serial_number);
data/nmon-16m+debian/lmon16m.c:1342:5:  [4] (buffer) sscanf:
  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.
    sscanf(str, "system_type=%s", lparcfg.system_type);
data/nmon-16m+debian/lmon16m.c:2146:6:  [4] (buffer) sscanf:
  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.
	    sscanf(&buf[0],
data/nmon-16m+debian/lmon16m.c:2253:6:  [4] (buffer) sscanf:
  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.
	    sscanf(&buf[0],
data/nmon-16m+debian/lmon16m.c:2829: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(dgroup_name[dgroup_total_groups], name);
data/nmon-16m+debian/lmon16m.c:3719:6:  [4] (buffer) sscanf:
  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.
	    sscanf(&buf[0],
data/nmon-16m+debian/lmon16m.c:3769:11:  [4] (buffer) sscanf:
  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.
    ret = sscanf(buf, "%d (%s)",
data/nmon-16m+debian/lmon16m.c:3792:11:  [4] (buffer) sscanf:
  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. If the scanf format is influenceable by an
  attacker, it's exploitable.
    ret = sscanf(&buf[count],
data/nmon-16m+debian/lmon16m.c:4096:2:  [4] (shell) execlp:
  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.
	execlp(cmd, cmd, time_stamp_str, (void *) 0);
data/nmon-16m+debian/lmon16m.c:4360:6:  [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(cmdlist[0], optarg);
data/nmon-16m+debian/lmon16m.c:4388:6:  [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(user_filename, optarg);
data/nmon-16m+debian/lmon16m.c:4412:9:  [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.
		ret = system(LSBLK_STRING);
data/nmon-16m+debian/lmon16m.c:4655:6:  [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(open_filename, user_filename);
data/nmon-16m+debian/lmon16m.c:6523:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(fp, str_p, LOOP, p->mem.memtotal / 1024.0,
data/nmon-16m+debian/lmon16m.c:6759:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(fp, str_p,
data/nmon-16m+debian/lmon16m.c:6916:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(fp, str_p, LOOP, 
data/nmon-16m+debian/lmon16m.c:7120:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7124:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7130:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7134:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7140:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7144:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7150:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7154:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7161:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7165:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7171:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7175:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7273:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7277:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7281:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7285:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7289:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7293:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7440:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7485:8:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			    fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7488:8:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			    fprintf(fp, show_rrd ? ":U" : ",0.0");
data/nmon-16m+debian/lmon16m.c:7767:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7775:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(fp, show_rrd ? ":U" : ",101.00");
data/nmon-16m+debian/lmon16m.c:7777:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7782:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7786:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7791:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7795:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7800:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7805:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7810:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7815:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7920:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7933:8:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			    fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7939:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7954:8:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			    fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7959:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp,
data/nmon-16m+debian/lmon16m.c:7974:8:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			    fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:7979:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp,
data/nmon-16m+debian/lmon16m.c:8002:8:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			    fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:8007:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    fprintf(fp,
data/nmon-16m+debian/lmon16m.c:8019:8:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			    fprintf(fp, show_rrd ? ":%.1f" : ",%.1f",
data/nmon-16m+debian/lmon16m.c:3386:10:  [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.
	    p = getenv("NMON");
data/nmon-16m+debian/lmon16m.c:4268:9:  [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 (getenv("NMONDEBUG") != NULL)
data/nmon-16m+debian/lmon16m.c:4270:9:  [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 (getenv("NMONERROR") != NULL)
data/nmon-16m+debian/lmon16m.c:4272:9:  [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 (getenv("NMONBUG1") != NULL)
data/nmon-16m+debian/lmon16m.c:4276:23:  [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 ((nmon_start = getenv("NMON_START")) != NULL) {
data/nmon-16m+debian/lmon16m.c:4279:21:  [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 ((nmon_end = getenv("NMON_END")) != NULL) {
data/nmon-16m+debian/lmon16m.c:4282:21:  [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 ((nmon_tmp = getenv("NMON_ONE_IN")) != NULL) {
data/nmon-16m+debian/lmon16m.c:4290:22:  [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 ((nmon_snap = getenv("NMON_SNAP")) != NULL) {
data/nmon-16m+debian/lmon16m.c:4293:21:  [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 ((nmon_tmp = getenv("NMON_TIMESTAMP")) != NULL) {
data/nmon-16m+debian/lmon16m.c:4311: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.
	cmdlist[i] = getenv(cmdstr);
data/nmon-16m+debian/lmon16m.c:4342:6:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	    getopt(argc, argv,
data/nmon-16m+debian/lmon16m.c:4711:35:  [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.
	    fprintf(fp, "AAA,user,%s\n", getenv("USER"));
data/nmon-16m+debian/lmon16m.c:5055:21:  [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 (welcome && getenv("NMON") == 0) {
data/nmon-16m+debian/lmon16m.c:178: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 gpu_name[4][1024];
data/nmon-16m+debian/lmon16m.c:182: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 gpu_driver_version[1024];
data/nmon-16m+debian/lmon16m.c:183: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 gpu_nvml_version[1024];
data/nmon-16m+debian/lmon16m.c:235: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 *month[12] = { "JAN", "FEB", "MAR", "APR", "MAY", "JUN",
data/nmon-16m+debian/lmon16m.c:263: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 errorstr[70];
data/nmon-16m+debian/lmon16m.c:303: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 tmpstr[LSCPU_STRLEN + 1];
data/nmon-16m+debian/lmon16m.c:415: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 *line[PROC_MAXLINES];
data/nmon-16m+debian/lmon16m.c:438: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[1024];
data/nmon-16m+debian/lmon16m.c:444:22:  [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 ((proc[num].fp = fopen(proc[num].filename, "r")) == NULL) {
data/nmon-16m+debian/lmon16m.c:524: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 pi_comm[64];
data/nmon-16m+debian/lmon16m.c:614: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 hostname[256];
data/nmon-16m+debian/lmon16m.c:615: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 run_name[256];
data/nmon-16m+debian/lmon16m.c:617: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 fullhostname[256];
data/nmon-16m+debian/lmon16m.c:694: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 string[64];
data/nmon-16m+debian/lmon16m.c:704: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 *easy[5] = { "not found", 0, 0, 0, 0 };
data/nmon-16m+debian/lmon16m.c:705: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 *lsb_release[5] = { "not found", 0, 0, 0, 0 };
data/nmon-16m+debian/lmon16m.c:711: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 tmpstr[1024+1];
data/nmon-16m+debian/lmon16m.c:759: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 tmpstr[CMDLEN];
data/nmon-16m+debian/lmon16m.c:817: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 tmpstr[CMDLEN];
data/nmon-16m+debian/lmon16m.c:844:23:  [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).
	    arglist[i].pid = atoi(tmpstr);
data/nmon-16m+debian/lmon16m.c:872: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 str[STRLEN];
data/nmon-16m+debian/lmon16m.c:915: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 boottime_str[64] = "not found";
data/nmon-16m+debian/lmon16m.c:948: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 dk_name[32];
data/nmon-16m+debian/lmon16m.c:1045: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 *nfs_v2_names[NFS_V2_NAMES_COUNT] = {
data/nmon-16m+debian/lmon16m.c:1052: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 *nfs_v3_names[22] = {
data/nmon-16m+debian/lmon16m.c:1061: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 *nfs_v4s_names[NFS_V4S_NAMES_COUNT] = {	/* get these names from nfsstat as they are NOT documented */
data/nmon-16m+debian/lmon16m.c:1078: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 *nfs_v4c_names[NFS_V4C_NAMES_COUNT] = {	/* get these names from nfsstat as they are NOT documented */
data/nmon-16m+debian/lmon16m.c:1132: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 part_name[16];
data/nmon-16m+debian/lmon16m.c:1163: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 version_string[16];	/*lparcfg 1.3 */
data/nmon-16m+debian/lmon16m.c:1165: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 serial_number[16];	/*HAL,0210033EA */
data/nmon-16m+debian/lmon16m.c:1166: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 system_type[64];	/*HAL,9124-720 */
data/nmon-16m+debian/lmon16m.c:1240: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 lpar_buffer[LPAR_LINE_MAX][LPAR_LINE_WIDTH];
data/nmon-16m+debian/lmon16m.c:1303: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/ppc64/lparcfg", "r")) == NULL) {
data/nmon-16m+debian/lmon16m.c:1578: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 *string[16] = { "", "1", "2", "3",
data/nmon-16m+debian/lmon16m.c:1594: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 *cmdlist[CMDMAX];
data/nmon-16m+debian/lmon16m.c:1682:11:  [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).
	    id = atoi(&proc[P_CPUINFO].line[i][14]);
data/nmon-16m+debian/lmon16m.c:1694:17:  [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).
	    siblings = atoi(&proc[P_CPUINFO].line[i][11]);
data/nmon-16m+debian/lmon16m.c:1700:14:  [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).
	    cores = atoi(&proc[P_CPUINFO].line[i][12]);
data/nmon-16m+debian/lmon16m.c:1893:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy((void *) &(q->cpu_total), (void *) &(p->cpu_total),
data/nmon-16m+debian/lmon16m.c:1895:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy((void *) q->cpuN, (void *) p->cpuN,
data/nmon-16m+debian/lmon16m.c:1925:8:  [2] (integer) atol:
  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).
			    atol(&proc[P_NFS].line[lineno][i + 1]);
data/nmon-16m+debian/lmon16m.c:1937:8:  [2] (integer) atol:
  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).
			    atol(&proc[P_NFS].line[lineno][i + 1]);
data/nmon-16m+debian/lmon16m.c:1945:25:  [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).
		nfs_v4c_names_count = atoi(&proc[P_NFS].line[lineno][6]);
data/nmon-16m+debian/lmon16m.c:1950:8:  [2] (integer) atol:
  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).
			    atol(&proc[P_NFS].line[lineno][i + 1]);
data/nmon-16m+debian/lmon16m.c:1979:8:  [2] (integer) atol:
  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).
			    atol(&proc[P_NFSD].line[lineno][i + 1]);
data/nmon-16m+debian/lmon16m.c:1991:8:  [2] (integer) atol:
  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).
			    atol(&proc[P_NFSD].line[lineno][i + 1]);
data/nmon-16m+debian/lmon16m.c:2000:25:  [2] (integer) atol:
  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).
		nfs_v4s_names_count = atol(&proc[P_NFSD].line[lineno][9]);
data/nmon-16m+debian/lmon16m.c:2006:8:  [2] (integer) atol:
  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).
			    atol(&proc[P_NFSD].line[lineno][i + 1]);
data/nmon-16m+debian/lmon16m.c:2104: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[1024];
data/nmon-16m+debian/lmon16m.c:2109: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/diskstats", "r")) == NULL) {
data/nmon-16m+debian/lmon16m.c:2221: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[1024];
data/nmon-16m+debian/lmon16m.c:2226: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/partitions", "r")) == NULL) {
data/nmon-16m+debian/lmon16m.c:2339:13:  [2] (integer) atol:
  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).
	    return atol(&proc[P_MEMINFO].line[i][j]);
data/nmon-16m+debian/lmon16m.c:2735: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 duff[64];
data/nmon-16m+debian/lmon16m.c:2779: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 *dgroup_name[DGROUPS];
data/nmon-16m+debian/lmon16m.c:2788: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 line[4096];
data/nmon-16m+debian/lmon16m.c:2789: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 name[1024];
data/nmon-16m+debian/lmon16m.c:2800:10:  [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).
    gp = fopen(dgroup_filename, "r");
data/nmon-16m+debian/lmon16m.c:3276: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 name[JFSNAMELEN+1];
data/nmon-16m+debian/lmon16m.c:3277: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 device[JFSNAMELEN+1];
data/nmon-16m+debian/lmon16m.c:3278: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 type[JFSNAMELEN+1];
data/nmon-16m+debian/lmon16m.c:3311:15:  [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).
		jfs[i].fd = open(jfs[i].name, O_RDONLY);
data/nmon-16m+debian/lmon16m.c:3373: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[1024];
data/nmon-16m+debian/lmon16m.c:3689: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[1024];
data/nmon-16m+debian/lmon16m.c:3695: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/net/dev", "r")) == NULL) {
data/nmon-16m+debian/lmon16m.c:3746: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 filename[64];
data/nmon-16m+debian/lmon16m.c:3747: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[1024 * 4];
data/nmon-16m+debian/lmon16m.c:3754: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(filename, "r")) == NULL) {
data/nmon-16m+debian/lmon16m.c:3859: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(filename, "r")) == NULL) {
data/nmon-16m+debian/lmon16m.c:3889: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(filename, "r")) != NULL) {
data/nmon-16m+debian/lmon16m.c:4009:38:  [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).
		    count = count + proc_procsinfo(atoi(dent->d_name), count);
data/nmon-16m+debian/lmon16m.c:4042: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 time_stamp_str[64] = "";
data/nmon-16m+debian/lmon16m.c:4147: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 pgrp[32];
data/nmon-16m+debian/lmon16m.c:4186: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 cmdstr[256];
data/nmon-16m+debian/lmon16m.c:4237: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 truncated_command[257]; /* 256 +1 */
data/nmon-16m+debian/lmon16m.c:4283: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).
	nmon_one_in = atoi(nmon_tmp);
data/nmon-16m+debian/lmon16m.c:4294:20:  [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).
	time_stamp_type = atoi(nmon_tmp);
data/nmon-16m+debian/lmon16m.c:4356:17:  [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).
	    maxloops = atoi(optarg);
data/nmon-16m+debian/lmon16m.c:4375: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).
	    diskmax = atoi(optarg);
data/nmon-16m+debian/lmon16m.c:4429:23:  [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).
	    disks_per_line = atoi(optarg);
data/nmon-16m+debian/lmon16m.c:4462: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).
	    seconds = atoi(optarg);
data/nmon-16m+debian/lmon16m.c:4533:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&q->cpu_total, &p->cpu_total, sizeof(struct cpu_stat));
data/nmon-16m+debian/lmon16m.c:4563:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(q->dk, p->dk, sizeof(struct dsk_stat) * disks);
data/nmon-16m+debian/lmon16m.c:4572:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(q->ifnets, p->ifnets, sizeof(struct net_stat) * networks);
data/nmon-16m+debian/lmon16m.c:4671: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(open_filename, "w")) == 0) {
data/nmon-16m+debian/lmon16m.c:5080:21:  [2] (integer) atol:
  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).
				if( max_speed < atol(&proc[P_CPUINFO].line[i][9]))
data/nmon-16m+debian/lmon16m.c:5081:18:  [2] (integer) atol:
  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).
					max_speed = atol(&proc[P_CPUINFO].line[i][9]);
data/nmon-16m+debian/lmon16m.c:6164:4:  [2] (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). Risk is low because the source is a constant string.
			strcpy(gpu_name[i], "NVML API Failed");
data/nmon-16m+debian/lmon16m.c:6937:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    memcpy(&q->nfs, &p->nfs, sizeof(struct nfs_stat));
data/nmon-16m+debian/lmon16m.c:7116:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    memcpy(&q->nfs, &p->nfs, sizeof(struct nfs_stat));
data/nmon-16m+debian/lmon16m.c:8217:8:  [2] (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). Risk is low because the source is a constant string.
			    strcpy(pgrp, "none");
data/nmon-16m+debian/lmon16m.c:246:9:  [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(callback) > 256) {
data/nmon-16m+debian/lmon16m.c:267:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(errorstr, err, 69);
data/nmon-16m+debian/lmon16m.c:312:13:  [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).
	    tmpstr[strlen(tmpstr) - 1] = 0;	/* remove newline */
data/nmon-16m+debian/lmon16m.c:313:43:  [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 (strncmp("Architecture:", tmpstr, strlen("Architecture:")) == 0) {
data/nmon-16m+debian/lmon16m.c:319:9:  [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).
		len = strlen(tmpstr);
data/nmon-16m+debian/lmon16m.c:325:23:  [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).
		lscpu.arch = MALLOC(strlen(&tmpstr[data_col]) + 1);
data/nmon-16m+debian/lmon16m.c:328:41:  [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 (strncmp("Byte Order:", tmpstr, strlen("Byte Order:")) == 0) {
data/nmon-16m+debian/lmon16m.c:329:29:  [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).
		lscpu.byte_order = MALLOC(strlen(&tmpstr[data_col]) + 1);
data/nmon-16m+debian/lmon16m.c:333:8:  [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).
		     strlen("Little Endian")) == 0) {
data/nmon-16m+debian/lmon16m.c:338:8:  [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).
		     strlen("Big Endian")) == 0) {
data/nmon-16m+debian/lmon16m.c:342:37:  [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 (strncmp("CPU(s):", tmpstr, strlen("CPU(s):")) == 0) {
data/nmon-16m+debian/lmon16m.c:347:4:  [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).
		 strlen("On-line CPU(s) list:")) == 0) {
data/nmon-16m+debian/lmon16m.c:348:29:  [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).
		lscpu.cpu_online = MALLOC(strlen(&tmpstr[data_col]) + 1);
data/nmon-16m+debian/lmon16m.c:353:4:  [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).
		 strlen("Off-line CPU(s) list:")) == 0) {
data/nmon-16m+debian/lmon16m.c:355:14:  [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).
		    MALLOC(strlen(&tmpstr[data_col]) + 1);
data/nmon-16m+debian/lmon16m.c:358:36:  [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 (strncmp("Model:", tmpstr, strlen("Model:")) == 0) {
data/nmon-16m+debian/lmon16m.c:359:24:  [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).
		lscpu.model = MALLOC(strlen(&tmpstr[data_col]) + 1);
data/nmon-16m+debian/lmon16m.c:362:41:  [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 (strncmp("Model name:", tmpstr, strlen("Model name:")) == 0) {
data/nmon-16m+debian/lmon16m.c:363:29:  [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).
		lscpu.model_name = MALLOC(strlen(&tmpstr[data_col]) + 1);
data/nmon-16m+debian/lmon16m.c:368:4:  [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).
		 strlen("Thread(s) per core:")) == 0) {
data/nmon-16m+debian/lmon16m.c:373:4:  [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).
		 strlen("Core(s) per socket:")) == 0) {
data/nmon-16m+debian/lmon16m.c:376:40:  [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 (strncmp("Socket(s):", tmpstr, strlen("Socket(s):")) == 0) {
data/nmon-16m+debian/lmon16m.c:379:43:  [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 (strncmp("NUMA node(s):", tmpstr, strlen("NUMA node(s):"))
data/nmon-16m+debian/lmon16m.c:383:38:  [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 (strncmp("CPU MHz:", tmpstr, strlen("CPU MHz:")) == 0) {
data/nmon-16m+debian/lmon16m.c:386:42:  [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 (strncmp("CPU max MHz:", tmpstr, strlen("CPU max MHz:")) ==
data/nmon-16m+debian/lmon16m.c:390:42:  [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 (strncmp("CPU min MHz:", tmpstr, strlen("CPU min MHz:")) ==
data/nmon-16m+debian/lmon16m.c:723:13:  [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).
	    tmpstr[strlen(tmpstr) - 1] = 0;	/* remove newline */
data/nmon-16m+debian/lmon16m.c:724:23:  [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).
	    easy[i] = MALLOC(strlen(tmpstr) + 1);
data/nmon-16m+debian/lmon16m.c:735:13:  [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).
	    tmpstr[strlen(tmpstr) - 1] = 0;	/* remove newline */
data/nmon-16m+debian/lmon16m.c:736:30:  [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).
	    lsb_release[i] = MALLOC(strlen(tmpstr) + 1);
data/nmon-16m+debian/lmon16m.c:785:9:  [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).
	tmpstr[strlen(tmpstr) - 1] = 0;
data/nmon-16m+debian/lmon16m.c:786:13:  [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 (tmpstr[strlen(tmpstr) - 1] == ' ')
data/nmon-16m+debian/lmon16m.c:787:13:  [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).
	    tmpstr[strlen(tmpstr) - 1] = 0;
data/nmon-16m+debian/lmon16m.c:793: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).
	n = strlen(tmpstr);
data/nmon-16m+debian/lmon16m.c:841:13:  [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).
	    tmpstr[strlen(tmpstr) - 1] = 0;
data/nmon-16m+debian/lmon16m.c:842:17:  [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 (tmpstr[strlen(tmpstr) - 1] == ' ')
data/nmon-16m+debian/lmon16m.c:843:10:  [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).
		tmpstr[strlen(tmpstr) - 1] = 0;
data/nmon-16m+debian/lmon16m.c:845:31:  [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).
	    arglist[i].args = MALLOC(strlen(tmpstr) + 1);
data/nmon-16m+debian/lmon16m.c:882:12:  [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).
	    len = strlen(str);
data/nmon-16m+debian/lmon16m.c:1248: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).
    len = strlen(s);
data/nmon-16m+debian/lmon16m.c:1265: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).
    len = strlen(str);
data/nmon-16m+debian/lmon16m.c:1339:21:  [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).
    for (i = 0; i < strlen(str); i++)	/* Remove new spaces in massive string meaning PowerKVM Guest !! */
data/nmon-16m+debian/lmon16m.c:1471:8:  [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).
	len = strlen(s);
data/nmon-16m+debian/lmon16m.c:1606: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(cmdlist[i]) == 0)
data/nmon-16m+debian/lmon16m.c:1608:32:  [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 (!strncmp(cmdlist[i], cmd, strlen(cmdlist[i])))
data/nmon-16m+debian/lmon16m.c:1921:9:  [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).
		len = strlen(proc[P_NFS].line[lineno]);
data/nmon-16m+debian/lmon16m.c:1933:9:  [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).
		len = strlen(proc[P_NFS].line[lineno]);
data/nmon-16m+debian/lmon16m.c:1946:9:  [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).
		len = strlen(proc[P_NFS].line[lineno]);
data/nmon-16m+debian/lmon16m.c:1975:9:  [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).
		len = strlen(proc[P_NFSD].line[lineno]);
data/nmon-16m+debian/lmon16m.c:1987:9:  [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).
		len = strlen(proc[P_NFSD].line[lineno]);
data/nmon-16m+debian/lmon16m.c:2001:9:  [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).
		len = strlen(proc[P_NFSD].line[lineno]);
data/nmon-16m+debian/lmon16m.c:2022:21:  [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).
    for (i = 0; i < strlen(proc[P_UPTIME].line[0]); i++) {
data/nmon-16m+debian/lmon16m.c:2061:21:  [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).
    for (i = 8; i < strlen(proc[P_STAT].line[diskline]); i++) {
data/nmon-16m+debian/lmon16m.c:2332: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).
    len = strlen(s);
data/nmon-16m+debian/lmon16m.c:2760: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).
    len = strlen(in);
data/nmon-16m+debian/lmon16m.c:2819: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(name) == 0) {	/* was a blank line */
data/nmon-16m+debian/lmon16m.c:2828:44:  [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).
	dgroup_name[dgroup_total_groups] = MALLOC(strlen(name) + 1);
data/nmon-16m+debian/lmon16m.c:2989:36:  [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 (strncmp(name, dgroup_name[i], strlen(name)) == 0)
data/nmon-16m+debian/lmon16m.c:3296:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(jfs[i].device, mp->mnt_fsname, JFSNAMELEN + 1);
data/nmon-16m+debian/lmon16m.c:3297:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(jfs[i].name, mp->mnt_dir, JFSNAMELEN + 1);
data/nmon-16m+debian/lmon16m.c:3298:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(jfs[i].type, mp->mnt_type, JFSTYPELEN + 1);
data/nmon-16m+debian/lmon16m.c:3388:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, p, 1024);
data/nmon-16m+debian/lmon16m.c:3390: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).
		chars = strlen(buf);
data/nmon-16m+debian/lmon16m.c:3398:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    chars = read(fileno(stdin), buf, bytes);
data/nmon-16m+debian/lmon16m.c:3776:29:  [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->procs[index].pi_comm[strlen(p->procs[index].pi_comm) - 1] = 0;
data/nmon-16m+debian/lmon16m.c:4263: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).
    for (i = (int) strlen(progname) - 1; i > 0; i--)
data/nmon-16m+debian/lmon16m.c:4317:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(fullhostname, hostname, 256);
data/nmon-16m+debian/lmon16m.c:4323:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(run_name, hostname, 256);
data/nmon-16m+debian/lmon16m.c:4359:26:  [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).
	    cmdlist[0] = MALLOC(strlen(optarg) + 1);	/* create buffer */
data/nmon-16m+debian/lmon16m.c:4387:29:  [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).
	    user_filename = MALLOC(strlen(optarg) + 1);
data/nmon-16m+debian/lmon16m.c:4457:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(run_name, optarg, 256);
data/nmon-16m+debian/lmon16m.c:4647:9:  [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(hostname) > 1024 )
data/nmon-16m+debian/lmon16m.c:4649:29:  [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).
	    open_filename = MALLOC(strlen(hostname) + 64); /* hostname plus directory size plus the number */
data/nmon-16m+debian/lmon16m.c:4650:30:  [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).
	    snprintf(open_filename, strlen(hostname) + 63,  "/var/perf/tmp/%s_%02d.nmon", hostname,
data/nmon-16m+debian/lmon16m.c:4654:29:  [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).
	    open_filename = MALLOC(strlen(user_filename) + 1);
data/nmon-16m+debian/lmon16m.c:4658:29:  [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).
	    open_filename = MALLOC(strlen(hostname) + 64);
data/nmon-16m+debian/lmon16m.c:4659:30:  [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).
	    snprintf(open_filename, strlen(hostname) + 63, "%s_%02d%02d%02d_%02d%02d.nmon",
data/nmon-16m+debian/lmon16m.c:6328:5:  [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).
			 strlen(clockstr)) == 0) {
data/nmon-16m+debian/lmon16m.c:6379:5:  [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).
			 strlen(clockstr)) == 0) {
data/nmon-16m+debian/lmon16m.c:7405:18:  [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 ((i = strlen(jfs[k].device)) < 20)
data/nmon-16m+debian/lmon16m.c:7647:8:  [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(p->dk[i].dk_name) > 8)
data/nmon-16m+debian/lmon16m.c:7650:13:  [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).
				dk_name[strlen(p->dk[i].dk_name) - 8];
data/nmon-16m+debian/lmon16m.c:8326:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy( truncated_command, args_lookup(p->procs[i].pi_pid, p->procs[i].pi_comm), 256);

ANALYSIS SUMMARY:

Hits = 262
Lines analyzed = 8584 in approximately 0.31 seconds (27846 lines/second)
Physical Source Lines of Code (SLOC) = 7631
Hits@level = [0] 570 [1]  83 [2]  91 [3]  13 [4]  75 [5]   0
Hits@level+ = [0+] 832 [1+] 262 [2+] 179 [3+]  88 [4+]  75 [5+]   0
Hits/KSLOC@level+ = [0+] 109.029 [1+] 34.3336 [2+] 23.457 [3+] 11.5319 [4+] 9.82833 [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.