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/netkit-ftp-0.17/ftp/glob.c
Examining data/netkit-ftp-0.17/ftp/glob.h
Examining data/netkit-ftp-0.17/ftp/pathnames.h
Examining data/netkit-ftp-0.17/ftp/domacro.c
Examining data/netkit-ftp-0.17/ftp/ruserpass.c
Examining data/netkit-ftp-0.17/ftp/main.h
Examining data/netkit-ftp-0.17/ftp/main.c
Examining data/netkit-ftp-0.17/ftp/cmds.c
Examining data/netkit-ftp-0.17/ftp/cmds.h
Examining data/netkit-ftp-0.17/ftp/cmdtab.c
Examining data/netkit-ftp-0.17/ftp/ftp.c
Examining data/netkit-ftp-0.17/ftp/ftp_var.h
Examining data/netkit-ftp-0.17/version.h

FINAL RESULTS:

data/netkit-ftp-0.17/ftp/ftp.c:1006:8:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
			    chmod(local, 0600) < 0) {
data/netkit-ftp-0.17/ftp/cmds.c:108:2:  [4] (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).
	strcat(nu, name);
data/netkit-ftp-0.17/ftp/cmds.c:290:10:  [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).
		(void) strcpy(typename, p->t_name);
data/netkit-ftp-0.17/ftp/cmds.c:882:10:  [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).
		(void) strcpy(temp, _PATH_TMP);
data/netkit-ftp-0.17/ftp/cmds.c:1567:10:  [4] (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).
		(void) strcat(shellnam, namep);
data/netkit-ftp-0.17/ftp/cmds.c:1575:4:  [4] (shell) execl:
  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.
			execl(theshell, shellnam, "-c", arg, NULL);
data/netkit-ftp-0.17/ftp/cmds.c:1578:4:  [4] (shell) execl:
  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.
			execl(theshell, shellnam, NULL);
data/netkit-ftp-0.17/ftp/cmds.c:1616:14:  [4] (misc) getpass:
  This function is obsolete and not portable. It was in SUSv2 but removed by
  POSIX.2. What it does exactly varies considerably between systems,
  particularly in where its prompt is displayed and where it gets its data
  (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations
  overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do
  exactly what you want. If you continue to use it, or write your own, be
  sure to zero the password as soon as possible to avoid leaving the
  cleartext password visible in the process' address space.
			argv[2] = getpass("Password: "), argc++;
data/netkit-ftp-0.17/ftp/cmds.c:1944:8:  [4] (misc) getpass:
  This function is obsolete and not portable. It was in SUSv2 but removed by
  POSIX.2. What it does exactly varies considerably between systems,
  particularly in where its prompt is displayed and where it gets its data
  (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations
  overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do
  exactly what you want. If you continue to use it, or write your own, be
  sure to zero the password as soon as possible to avoid leaving the
  cleartext password visible in the process' address space.
		ap = getpass("Account:");
data/netkit-ftp-0.17/ftp/ftp.c:368:18:  [4] (misc) getlogin:
  It's often easy to fool getlogin. Sometimes it does not work at all,
  because some program messed up the utmp file. Often, it gives only the
  first 8 characters of the login name. The user currently logged in on the
  controlling tty of our program need not be the user who started it. Avoid
  getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid())
  and extract the desired information instead.
		char *myname = getlogin();
data/netkit-ftp-0.17/ftp/ftp.c:396:11:  [4] (misc) getpass:
  This function is obsolete and not portable. It was in SUSv2 but removed by
  POSIX.2. What it does exactly varies considerably between systems,
  particularly in where its prompt is displayed and where it gets its data
  (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations
  overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do
  exactly what you want. If you continue to use it, or write your own, be
  sure to zero the password as soon as possible to avoid leaving the
  cleartext password visible in the process' address space.
			pass = getpass("Password:");
data/netkit-ftp-0.17/ftp/ftp.c:403:11:  [4] (misc) getpass:
  This function is obsolete and not portable. It was in SUSv2 but removed by
  POSIX.2. What it does exactly varies considerably between systems,
  particularly in where its prompt is displayed and where it gets its data
  (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations
  overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do
  exactly what you want. If you continue to use it, or write your own, be
  sure to zero the password as soon as possible to avoid leaving the
  cleartext password visible in the process' address space.
		zacct = getpass("Account:");
data/netkit-ftp-0.17/ftp/ftp.c:446:4:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			vprintf(fmt, ap);
data/netkit-ftp-0.17/ftp/ftp.c:459:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(cout, fmt, ap);
data/netkit-ftp-0.17/ftp/ftp.c:676:9:  [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.
		fin = popen(local + 1, "r");
data/netkit-ftp-0.17/ftp/ftp.c:983:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if (access(local, W_OK) < 0) {
data/netkit-ftp-0.17/ftp/ftp.c:995:8:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
			d = access(dir ? local : ".", W_OK);
data/netkit-ftp-0.17/ftp/ftp.c:1072:10:  [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.
		fout = popen(local + 1, "w");
data/netkit-ftp-0.17/ftp/ftp.c:1636:9:  [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).
	(void) strcpy(ntin, op->nti);
data/netkit-ftp-0.17/ftp/ftp.c:1639:9:  [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).
	(void) strcpy(ntout, op->nto);
data/netkit-ftp-0.17/ftp/ftp.c:1644:9:  [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).
	(void) strcpy(mapin, op->mi);
data/netkit-ftp-0.17/ftp/ftp.c:1647:9:  [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).
	(void) strcpy(mapout, op->mo);
data/netkit-ftp-0.17/ftp/ftp.c:1819:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	d = access(cp ? local : ".", W_OK);
data/netkit-ftp-0.17/ftp/ftp.c:1826:9:  [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).
	(void) strcpy(new, local);
data/netkit-ftp-0.17/ftp/ftp.c:1840:12:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if ((d = access(new, F_OK)) < 0)
data/netkit-ftp-0.17/ftp/glob.c:232:12:  [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).
				(void) strcpy(gpath, home);
data/netkit-ftp-0.17/ftp/glob.c:361: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(lm, pl);
data/netkit-ftp-0.17/ftp/glob.c:367:10:  [4] (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).
		(void) strcat(restbuf, pe + 1);
data/netkit-ftp-0.17/ftp/glob.c:686: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(ep, cp);
data/netkit-ftp-0.17/ftp/glob.c:687:2:  [4] (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).
	strcat(ep, dp);
data/netkit-ftp-0.17/ftp/glob.c:748: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(homedir, pp->pw_dir);
data/netkit-ftp-0.17/ftp/main.c:225:7:  [4] (misc) getlogin:
  It's often easy to fool getlogin. Sometimes it does not work at all,
  because some program messed up the utmp file. Often, it gives only the
  first 8 characters of the login name. The user currently logged in on the
  controlling tty of our program need not be the user who started it. Avoid
  getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid())
  and extract the desired information instead.
	cp = getlogin();
data/netkit-ftp-0.17/ftp/cmds.c:1558:14:  [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.
		theshell = getenv("SHELL");
data/netkit-ftp-0.17/ftp/main.c:211: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.
		rl_terminal_name = getenv("TERM");
data/netkit-ftp-0.17/ftp/ruserpass.c:88: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.
	hdir = getenv("HOME");
data/netkit-ftp-0.17/ftp/cmds.c:225:10:  [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).
		port = atoi(argv[2]);
data/netkit-ftp-0.17/ftp/cmds.c:240:10:  [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.
		(void) strcpy(typename, "ascii"), type = TYPE_A;
data/netkit-ftp-0.17/ftp/cmds.c:242:10:  [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.
		(void) strcpy(formname, "non-print"), form = FORM_N;
data/netkit-ftp-0.17/ftp/cmds.c:243:10:  [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.
		(void) strcpy(modename, "stream"), mode = MODE_S;
data/netkit-ftp-0.17/ftp/cmds.c:244:10:  [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.
		(void) strcpy(structname, "file"), stru = STRU_F;
data/netkit-ftp-0.17/ftp/cmds.c:501: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 *cp, *tp2, tmpbuf[PATH_MAX];
data/netkit-ftp-0.17/ftp/cmds.c:775: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 *cp, *tp, *tp2, tmpbuf[PATH_MAX];
data/netkit-ftp-0.17/ftp/cmds.c:846:9:  [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[PATH_MAX];
data/netkit-ftp-0.17/ftp/cmds.c:874: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 temp[16] = "";
data/netkit-ftp-0.17/ftp/cmds.c:900:8:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
		fd = mkstemp(temp);
data/netkit-ftp-0.17/ftp/cmds.c:1034: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		buffer[MAXPATHLEN], dotdot[MAXPATHLEN];
data/netkit-ftp-0.17/ftp/cmds.c:1287:9:  [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).
		val = atoi(argv[1]);
data/netkit-ftp-0.17/ftp/cmds.c:1331: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[PATH_MAX];
data/netkit-ftp-0.17/ftp/cmds.c:1356:25:  [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.
	    if (errno==ERANGE) strcpy(buf, "<too long>");
data/netkit-ftp-0.17/ftp/cmds.c:1357:11:  [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.
	    else strcpy(buf, "???");
data/netkit-ftp-0.17/ftp/cmds.c:1449:9:  [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 foo[2] = "-";
data/netkit-ftp-0.17/ftp/cmds.c:1548: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 shellnam[40];
data/netkit-ftp-0.17/ftp/cmds.c:1603: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 theacct[80];
data/netkit-ftp-0.17/ftp/cmds.c:1852: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 lyne[BUFSIZ];
data/netkit-ftp-0.17/ftp/cmds.c:1931: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], *ap;
data/netkit-ftp-0.17/ftp/cmds.c:2078:9:  [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 new[PATH_MAX];
data/netkit-ftp-0.17/ftp/cmds.c:2138:9:  [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 new[PATH_MAX];
data/netkit-ftp-0.17/ftp/cmds.c:2140: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 *tp[9], *te[9];
data/netkit-ftp-0.17/ftp/cmds.c:2568:10:  [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.
		(void) strcpy(typename, "binary");
data/netkit-ftp-0.17/ftp/domacro.c:55: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(p, s, slen);
data/netkit-ftp-0.17/ftp/ftp.c:77: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 ipstring[INET6_ADDRSTRLEN]; /* Scribble area for resolver. */
data/netkit-ftp-0.17/ftp/ftp.c:123:9:  [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 hostnamebuf[256];
data/netkit-ftp-0.17/ftp/ftp.c:149: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(&hisctladdr, aiptr->ai_addr, aiptr->ai_addrlen);
data/netkit-ftp-0.17/ftp/ftp.c:221:4:  [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(&hisctladdr, aiptr->ai_addr,
data/netkit-ftp-0.17/ftp/ftp.c:355:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tmp[80];
data/netkit-ftp-0.17/ftp/ftp.c:480: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 reply_string[BUFSIZ];		/* last line of previous reply */
data/netkit-ftp-0.17/ftp/ftp.c:633: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[BUFSIZ], *bufp;
data/netkit-ftp-0.17/ftp/ftp.c:687:9:  [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).
		fin = fopen(local, "r");
data/netkit-ftp-0.17/ftp/ftp.c:1082: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).
		fout = fopen(local, lmode);
data/netkit-ftp-0.17/ftp/ftp.c:1566: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 name[MAXHOSTNAMELEN];
data/netkit-ftp-0.17/ftp/ftp.c:1578: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 nti[17];
data/netkit-ftp-0.17/ftp/ftp.c:1579: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 nto[17];
data/netkit-ftp-0.17/ftp/ftp.c:1581: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 mi[MAXPATHLEN];
data/netkit-ftp-0.17/ftp/ftp.c:1582: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 mo[MAXPATHLEN];
data/netkit-ftp-0.17/ftp/ftp.c:1812:9:  [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 new[MAXPATHLEN];
data/netkit-ftp-0.17/ftp/ftp.c:1857: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[BUFSIZ];
data/netkit-ftp-0.17/ftp/ftp_var.h:100: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.
Extern char     pasv[64];       /* passive port for proxy data connection */
data/netkit-ftp-0.17/ftp/ftp_var.h:103: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.
Extern char	ntin[17];	/* input translation table */
data/netkit-ftp-0.17/ftp/ftp_var.h:104: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.
Extern char	ntout[17];	/* output translation table */
data/netkit-ftp-0.17/ftp/ftp_var.h:105: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.
Extern char	mapin[MAXPATHLEN];	/* input map template */
data/netkit-ftp-0.17/ftp/ftp_var.h:106: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.
Extern char	mapout[MAXPATHLEN];	/* output map template */
data/netkit-ftp-0.17/ftp/ftp_var.h:107: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.
Extern char	typename[32];		/* name of file transfer type */
data/netkit-ftp-0.17/ftp/ftp_var.h:110: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.
Extern char	structname[32];		/* name of file transfer structure */
data/netkit-ftp-0.17/ftp/ftp_var.h:112: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.
Extern char	formname[32];		/* name of file transfer format */
data/netkit-ftp-0.17/ftp/ftp_var.h:114: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.
Extern char	modename[32];		/* name of file transfer mode */
data/netkit-ftp-0.17/ftp/ftp_var.h:116: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.
Extern char	bytename[32];		/* local byte size in ascii */
data/netkit-ftp-0.17/ftp/ftp_var.h:154: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 mac_name[9];	/* macro name */
data/netkit-ftp-0.17/ftp/ftp_var.h:161: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.
Extern char macbuf[4096];
data/netkit-ftp-0.17/ftp/glob.c:117: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 agpath[BUFSIZ];
data/netkit-ftp-0.17/ftp/glob.c:312: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 restbuf[BUFSIZ + 2];
data/netkit-ftp-0.17/ftp/main.c:125: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 homedir[MAXPATHLEN];
data/netkit-ftp-0.17/ftp/ruserpass.c:62: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 tokval[100];
data/netkit-ftp-0.17/ftp/ruserpass.c:82: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[BUFSIZ], *tmp;
data/netkit-ftp-0.17/ftp/ruserpass.c:83: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 myname[MAXHOSTNAMELEN];
data/netkit-ftp-0.17/ftp/ruserpass.c:92: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).
	cfile = fopen(buf, "r");
data/netkit-ftp-0.17/ftp/cmds.c:104:35:  [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).
	nu = obstack_alloc(&mainobstack, strlen(name)+3);
data/netkit-ftp-0.17/ftp/cmds.c:106:2:  [1] (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 character.
	strcpy(nu, ".");
data/netkit-ftp-0.17/ftp/cmds.c:107:20:  [1] (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 character.
	if (*name != '/') strcat(nu, "/");
data/netkit-ftp-0.17/ftp/cmds.c:121: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(name)+1;
data/netkit-ftp-0.17/ftp/cmds.c:159: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).
	unsigned len = strlen(line);
data/netkit-ftp-0.17/ftp/cmds.c:245:10:  [1] (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 character.
		(void) strcpy(bytename, "8"), bytesize = 8;
data/netkit-ftp-0.17/ftp/cmds.c:898:14:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		oldumask = umask(077);
data/netkit-ftp-0.17/ftp/cmds.c:902:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		umask(oldumask);
data/netkit-ftp-0.17/ftp/cmds.c:1566:10:  [1] (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 character.
		(void) strcpy(shellnam,"-");
data/netkit-ftp-0.17/ftp/cmds.c:1736: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).
	obstack_grow(&mainobstack, initial, strlen(initial));
data/netkit-ftp-0.17/ftp/cmds.c:1738:39:  [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).
		obstack_grow(&mainobstack, argv[1], strlen(argv[1]));
data/netkit-ftp-0.17/ftp/cmds.c:1741: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).
			obstack_grow(&mainobstack, argv[i], strlen(argv[i]));
data/netkit-ftp-0.17/ftp/cmds.c:1922:39:  [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).
	rv = obstack_copy0(&mainobstack, rv, strlen(rv));
data/netkit-ftp-0.17/ftp/cmds.c:1938:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
			strncat(buf, *argv, sizeof(buf)-strlen(buf));
data/netkit-ftp-0.17/ftp/cmds.c:1938: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).
			strncat(buf, *argv, sizeof(buf)-strlen(buf));
data/netkit-ftp-0.17/ftp/cmds.c:2065:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(ntin, argv[1], 16);
data/netkit-ftp-0.17/ftp/cmds.c:2071:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(ntout, argv[2], 16);
data/netkit-ftp-0.17/ftp/cmds.c:2127:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(mapin, altarg, sizeof(mapin) - 1);
data/netkit-ftp-0.17/ftp/cmds.c:2130:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(mapout, cp, sizeof(mapout) - 1);
data/netkit-ftp-0.17/ftp/cmds.c:2371:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(macros[macnum].mac_name, argv[1], 8);
data/netkit-ftp-0.17/ftp/cmds.c:2382:12:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if ((c = getchar()) == EOF) {
data/netkit-ftp-0.17/ftp/cmds.c:2403:15:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c = getchar()) != '\n' && c != EOF)
data/netkit-ftp-0.17/ftp/cmds.c:2405:19:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (c == EOF || getchar() == '\n') {
data/netkit-ftp-0.17/ftp/domacro.c:50: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).
	size_t slen = strlen(s);
data/netkit-ftp-0.17/ftp/domacro.c:94: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(cp1) + 1;
data/netkit-ftp-0.17/ftp/ftp.c:150:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(hostnamebuf, aiptr->ai_canonname,
data/netkit-ftp-0.17/ftp/ftp.c:384:7:  [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(tmp);
data/netkit-ftp-0.17/ftp/ftp.c:504:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c = getc(cin)) != '\n') {
data/netkit-ftp-0.17/ftp/ftp.c:506:17:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				switch (c = getc(cin)) {
data/netkit-ftp-0.17/ftp/ftp.c:509:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					if ((c = getc(cin)) == EOF)
data/netkit-ftp-0.17/ftp/ftp.c:517:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					if ((c = getc(cin)) == EOF)
data/netkit-ftp-0.17/ftp/ftp.c:787:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c = read(fileno(fin), buf, sizeof (buf))) > 0) {
data/netkit-ftp-0.17/ftp/ftp.c:827:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c = getc(fin)) != EOF) {
data/netkit-ftp-0.17/ftp/ftp.c:1116:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c = read(fileno(din), buf, bufsize)) > 0) {
data/netkit-ftp-0.17/ftp/ftp.c:1165:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if ((ch = getc(fout)) == EOF)
data/netkit-ftp-0.17/ftp/ftp.c:1184:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c = getc(din)) != EOF) {
data/netkit-ftp-0.17/ftp/ftp.c:1200:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if ((c = getc(din)) != '\n' || tcrflag) {
data/netkit-ftp-0.17/ftp/ftp.c:1605:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void) strncpy(ip->name, hostname, sizeof(ip->name) - 1);
data/netkit-ftp-0.17/ftp/ftp.c:1634:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(ip->nti, ntin, sizeof(ip->nti) - 1);
data/netkit-ftp-0.17/ftp/ftp.c:1637:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(ip->nto, ntout, sizeof(ip->nto) - 1);
data/netkit-ftp-0.17/ftp/ftp.c:1642:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(ip->mi, mapin, sizeof(ip->mi) - 1);
data/netkit-ftp-0.17/ftp/ftp.c:1645:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(ip->mo, mapout, sizeof(ip->mo) - 1);
data/netkit-ftp-0.17/ftp/ftp.c:1827: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).
	cp = new + strlen(new);
data/netkit-ftp-0.17/ftp/ftp.c:1890:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (read(fileno(din), buf, BUFSIZ) > 0)
data/netkit-ftp-0.17/ftp/glob.c:229: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).
				memmove(gpath, gpath+1, strlen(gpath+1)+1);
data/netkit-ftp-0.17/ftp/glob.c:364:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(lm, pl, pm-pl);
data/netkit-ftp-0.17/ftp/glob.c:572: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).
	int len = strlen(s1) + strlen(s2) + 1;
data/netkit-ftp-0.17/ftp/glob.c:572:25:  [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 len = strlen(s1) + strlen(s2) + 1;
data/netkit-ftp-0.17/ftp/glob.c:683: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).
	char *ep = malloc(strlen(cp) + strlen(dp) + 1);
data/netkit-ftp-0.17/ftp/glob.c:683:33:  [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).
	char *ep = malloc(strlen(cp) + strlen(dp) + 1);
data/netkit-ftp-0.17/ftp/glob.c:746: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).
	if (!pp || homedir + strlen(pp->pw_dir) >= lastgpathp)
data/netkit-ftp-0.17/ftp/main.c:232:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(homedir, pw->pw_dir, sizeof(homedir));
data/netkit-ftp-0.17/ftp/main.c:365: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(lineread);
data/netkit-ftp-0.17/ftp/main.c:416:7:  [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).
		l = strlen(line);
data/netkit-ftp-0.17/ftp/main.c:503:39:  [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).
	argbuf = obstack_alloc(&mainobstack, strlen(line) + 1);
data/netkit-ftp-0.17/ftp/main.c:667: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).
			int len = strlen(c->c_name);
data/netkit-ftp-0.17/ftp/main.c:684: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 (k=0; k < strlen(c->c_name); k++) {
data/netkit-ftp-0.17/ftp/main.c:692: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).
				w = strlen(c->c_name);
data/netkit-ftp-0.17/ftp/ruserpass.c:140:50:  [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).
					*aname = obstack_copy(&mainobstack, tokval, strlen(tokval) + 1);
data/netkit-ftp-0.17/ftp/ruserpass.c:160:49:  [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).
				*apass = obstack_copy(&mainobstack, tokval, strlen(tokval) + 1);
data/netkit-ftp-0.17/ftp/ruserpass.c:171:49:  [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).
				*aacct = obstack_copy(&mainobstack, tokval, strlen(tokval) + 1);
data/netkit-ftp-0.17/ftp/ruserpass.c:179:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			while ((c=getc(cfile)) != EOF && (c == ' ' || c == '\t'));
data/netkit-ftp-0.17/ftp/ruserpass.c:190:26:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			for (i=0; i < 8 && (c=getc(cfile)) != EOF &&
data/netkit-ftp-0.17/ftp/ruserpass.c:200:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				while ((c=getc(cfile)) != EOF && c != '\n');
data/netkit-ftp-0.17/ftp/ruserpass.c:214:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if ((c=getc(cfile)) == EOF) {
data/netkit-ftp-0.17/ftp/ruserpass.c:257:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((c = getc(cfile)) != EOF &&
data/netkit-ftp-0.17/ftp/ruserpass.c:264:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c = getc(cfile)) != EOF && c != '"') {
data/netkit-ftp-0.17/ftp/ruserpass.c:266:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				c = getc(cfile);
data/netkit-ftp-0.17/ftp/ruserpass.c:271:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c = getc(cfile)) != EOF
data/netkit-ftp-0.17/ftp/ruserpass.c:274:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				c = getc(cfile);

ANALYSIS SUMMARY:

Hits = 165
Lines analyzed = 6980 in approximately 0.22 seconds (32132 lines/second)
Physical Source Lines of Code (SLOC) = 5716
Hits@level = [0] 224 [1]  70 [2]  60 [3]   3 [4]  31 [5]   1
Hits@level+ = [0+] 389 [1+] 165 [2+]  95 [3+]  35 [4+]  32 [5+]   1
Hits/KSLOC@level+ = [0+] 68.0546 [1+] 28.8663 [2+] 16.62 [3+] 6.12316 [4+] 5.59832 [5+] 0.174948
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.