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-telnet-0.17/version.h
Examining data/netkit-telnet-0.17/telnet/array.h
Examining data/netkit-telnet-0.17/telnet/authenc.cc
Examining data/netkit-telnet-0.17/telnet/environ.cc
Examining data/netkit-telnet-0.17/telnet/environ.h
Examining data/netkit-telnet-0.17/telnet/fdset.h
Examining data/netkit-telnet-0.17/telnet/general.h
Examining data/netkit-telnet-0.17/telnet/genget.cc
Examining data/netkit-telnet-0.17/telnet/genget.h
Examining data/netkit-telnet-0.17/telnet/ptrarray.h
Examining data/netkit-telnet-0.17/telnet/terminal.h
Examining data/netkit-telnet-0.17/telnet/tn3270.cc
Examining data/netkit-telnet-0.17/telnet/types.h
Examining data/netkit-telnet-0.17/telnet/network.cc
Examining data/netkit-telnet-0.17/telnet/ring.cc
Examining data/netkit-telnet-0.17/telnet/ring.h
Examining data/netkit-telnet-0.17/telnet/sys_bsd.cc
Examining data/netkit-telnet-0.17/telnet/main.cc
Examining data/netkit-telnet-0.17/telnet/netlink.cc
Examining data/netkit-telnet-0.17/telnet/netlink.h
Examining data/netkit-telnet-0.17/telnet/terminal.cc
Examining data/netkit-telnet-0.17/telnet/defines.h
Examining data/netkit-telnet-0.17/telnet/proto.h
Examining data/netkit-telnet-0.17/telnet/externs.h
Examining data/netkit-telnet-0.17/telnet/utilities.cc
Examining data/netkit-telnet-0.17/telnet/commands.cc
Examining data/netkit-telnet-0.17/telnet/telnet.cc
Examining data/netkit-telnet-0.17/telnetd/getent.c
Examining data/netkit-telnet-0.17/telnetd/logout.h
Examining data/netkit-telnet-0.17/telnetd/logwtmp.h
Examining data/netkit-telnet-0.17/telnetd/pathnames.h
Examining data/netkit-telnet-0.17/telnetd/setproctitle.h
Examining data/netkit-telnet-0.17/telnetd/slc.c
Examining data/netkit-telnet-0.17/telnetd/telnetd.h
Examining data/netkit-telnet-0.17/telnetd/termstat.c
Examining data/netkit-telnet-0.17/telnetd/authenc.c
Examining data/netkit-telnet-0.17/telnetd/defs.h
Examining data/netkit-telnet-0.17/telnetd/global.c
Examining data/netkit-telnet-0.17/telnetd/setproctitle.c
Examining data/netkit-telnet-0.17/telnetd/ext.h
Examining data/netkit-telnet-0.17/telnetd/state.c
Examining data/netkit-telnet-0.17/telnetd/sys_term.c
Examining data/netkit-telnet-0.17/telnetd/utility.c
Examining data/netkit-telnet-0.17/telnetd/telnetd.c
Examining data/netkit-telnet-0.17/telnetlogin/telnetlogin.c

FINAL RESULTS:

data/netkit-telnet-0.17/telnet/ring.cc:73:14:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
int ringbuf::gets(char *rbuf, int max) {
data/netkit-telnet-0.17/telnet/ring.h:71:9:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
    int gets(char *buf, int max);
data/netkit-telnet-0.17/telnet/telnet.cc:1650:17:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
	  l = ttyiring.gets(buf, sizeof(buf));
data/netkit-telnet-0.17/telnet/telnet.cc:1679:15:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
	l = ttyiring.gets(buf, sizeof(buf));
data/netkit-telnet-0.17/telnetd/sys_term.c:514:5:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    chown(lyne, 0, 0);
data/netkit-telnet-0.17/telnetd/sys_term.c:515:5:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    chmod(lyne, 0600);
data/netkit-telnet-0.17/telnet/authenc.cc:99:15:  [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.
	extern char *getpass();
data/netkit-telnet-0.17/telnet/authenc.cc:109:18:  [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.
	else if ((res = getpass(prompt))!=NULL) {
data/netkit-telnet-0.17/telnet/commands.cc:201: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(saveline, line);	/* save for shell command */
data/netkit-telnet-0.17/telnet/commands.cc:1350:3:  [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(shellp, shellname, "-c", &saveline[1], 0);
data/netkit-telnet-0.17/telnet/commands.cc:1352:3:  [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(shellp, shellname, 0);
data/netkit-telnet-0.17/telnet/commands.cc:1843: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(hostname, hostp);
data/netkit-telnet-0.17/telnet/commands.cc:1847: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(hostname, tmpaddr->ai_canonname);
data/netkit-telnet-0.17/telnet/commands.cc:2108:5:  [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(m1save, m1);
data/netkit-telnet-0.17/telnet/commands.cc:2110:5:  [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(portsave, port);
data/netkit-telnet-0.17/telnet/environ.cc:28:8:  [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).
	var = strcpy(new char[strlen(vr)+1], vr);
data/netkit-telnet-0.17/telnet/environ.cc:29: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).
	value = strcpy(new char[strlen(vl)+1], vl);
data/netkit-telnet-0.17/telnet/environ.cc:105:5:  [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(hbuf, cp2);
data/netkit-telnet-0.17/telnet/main.cc:226: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(transcom, optarg);
data/netkit-telnet-0.17/telnet/ring.cc:172:13:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    int l = vsnprintf(xbuf, sizeof(xbuf), format, ap);
data/netkit-telnet-0.17/telnet/tn3270.cc:359:5:  [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(transcom, argv[1]);
data/netkit-telnet-0.17/telnet/tn3270.cc:362: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(transcom, argv[i]);
data/netkit-telnet-0.17/telnet/types.h:45: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.
    int system;			/* what the current time is */
data/netkit-telnet-0.17/telnet/utilities.cc:83: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((char *)NetTraceFile, file);
data/netkit-telnet-0.17/telnet/utilities.cc:617:5:  [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(NetTrace, "\" %03o " + noquote,
data/netkit-telnet-0.17/telnetd/defs.h:104:42:  [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.
#define	settimer(x)	(clocks.x = ++clocks.system)
data/netkit-telnet-0.17/telnetd/ext.h:88:30:  [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.
#define netoprintf(fmt, ...) fprintf(netfile, fmt, ## __VA_ARGS__)
data/netkit-telnet-0.17/telnetd/ext.h:202: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.
    int system;			/* what the current time is */
data/netkit-telnet-0.17/telnetd/setproctitle.c:123: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(p, Argv0);
data/netkit-telnet-0.17/telnetd/setproctitle.c:129:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	(void) vsnprintf(p, sizeof(buf) - (p - buf), fmt, ap);
data/netkit-telnet-0.17/telnetd/setproctitle.c:139: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(Argv[0], buf);
data/netkit-telnet-0.17/telnetd/sys_term.c:682:5:  [4] (shell) execv:
  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.
    execv(loginprg, argvfoo);
data/netkit-telnet-0.17/telnetd/telnetd.c:542: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(first, terminaltype);
data/netkit-telnet-0.17/telnetd/telnetd.c:548: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(last, terminaltype);
data/netkit-telnet-0.17/telnetd/telnetd.c:577:4:  [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(terminaltype, first);
data/netkit-telnet-0.17/telnetd/utility.c:411: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(res, host);
data/netkit-telnet-0.17/telnet/commands.cc:1342: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.
	    shellp = getenv("SHELL");
data/netkit-telnet-0.17/telnet/commands.cc:1855: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.
	user = getenv("USER");
data/netkit-telnet-0.17/telnet/commands.cc:2161:44:  [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 (asprintf (&rcname, "%s/.telnetrc", getenv ("HOME")) == -1)
data/netkit-telnet-0.17/telnet/main.cc:132:15:  [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.
	while ((ch = getopt(argc, argv,
data/netkit-telnet-0.17/telnetd/authenc.c:56:18:  [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.
    extern char *getenv();
data/netkit-telnet-0.17/telnetd/authenc.c:57:12:  [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.
    return(getenv(val));
data/netkit-telnet-0.17/telnetd/sys_term.c:592:18:  [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 ((*envp = getenv("TZ"))!=NULL)
data/netkit-telnet-0.17/telnetd/sys_term.c:668: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.
	    if (getenv("USER")) {
data/netkit-telnet-0.17/telnetd/sys_term.c:669:16:  [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.
		addarg(&avs, getenv("USER"));
data/netkit-telnet-0.17/telnetd/sys_term.c:670:8:  [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("USER") == '-') {
data/netkit-telnet-0.17/telnetd/telnetd.c:224:15:  [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.
	while ((ch = getopt(argc, argv, "d:a:e:lhnNr:I:D:B:sS:a:X:L:")) != EOF) {
data/netkit-telnet-0.17/telnetd/telnetd.c:909: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("USER"))
data/netkit-telnet-0.17/telnet/array.h:57: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(x,v,n*sizeof(T));
data/netkit-telnet-0.17/telnet/commands.cc:189: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 line[256];
data/netkit-telnet-0.17/telnet/commands.cc:190: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 saveline[256];
data/netkit-telnet-0.17/telnet/commands.cc:192:14:  [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 const char *margv[20];
data/netkit-telnet-0.17/telnet/commands.cc:276: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[5];
data/netkit-telnet-0.17/telnet/commands.cc:1274: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[50];
data/netkit-telnet-0.17/telnet/commands.cc:1330:12:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
    switch(vfork()) {
data/netkit-telnet-0.17/telnet/commands.cc:1633: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[NI_MAXHOST];
data/netkit-telnet-0.17/telnet/commands.cc:1634: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 service[NI_MAXSERV];
data/netkit-telnet-0.17/telnet/commands.cc:1649:9:  [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(line, "open ");
data/netkit-telnet-0.17/telnet/commands.cc:2105: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 m1save[l1 + 1];
data/netkit-telnet-0.17/telnet/commands.cc:2106: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 portsave[lport + 1];
data/netkit-telnet-0.17/telnet/commands.cc:2113:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    rcfile = fopen(rcname, "r");
data/netkit-telnet-0.17/telnet/commands.cc:2212: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 lsr[44];
data/netkit-telnet-0.17/telnet/commands.cc:2287: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(&sin_addr, host->h_addr_list[0], host->h_length);
data/netkit-telnet-0.17/telnet/commands.cc:2289: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(&sin_addr, host->h_addr, host->h_length);
data/netkit-telnet-0.17/telnet/commands.cc:2295:3:  [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(lsrp, (char *)&sin_addr, 4);
data/netkit-telnet-0.17/telnet/environ.cc:88: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 hbuf[256];
data/netkit-telnet-0.17/telnet/main.cc:254: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.
		const char *args[7];
data/netkit-telnet-0.17/telnet/ring.cc:169: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 xbuf[256];
data/netkit-telnet-0.17/telnet/telnet.cc:73:17:  [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 unsigned char subbuffer[SUBBUFSIZE];
data/netkit-telnet-0.17/telnet/telnet.cc:86: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	options[256];		/* The combined options */
data/netkit-telnet-0.17/telnet/telnet.cc:87: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	do_dont_resp[256];
data/netkit-telnet-0.17/telnet/telnet.cc:88: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	will_wont_resp[256];
data/netkit-telnet-0.17/telnet/telnet.cc:203: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 buffer[100];		/* where things go */
data/netkit-telnet-0.17/telnet/telnet.cc:609: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 termbuf[2048];
data/netkit-telnet-0.17/telnet/telnet.cc:688:11:  [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.
	unsigned char tbuf[7 + 20];	/* 20 chars for terminal name.  */
data/netkit-telnet-0.17/telnet/telnet.cc:709:11:  [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.
	unsigned char tbuf[8 + 20];	/* 20 characters for two speeds.  */
data/netkit-telnet-0.17/telnet/telnet.cc:806:11:  [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.
	unsigned char tbuf[7 + 30];	/* 30 chars for display name.  */
data/netkit-telnet-0.17/telnet/telnet.cc:833:14:  [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.
    unsigned char tbuf[8];
data/netkit-telnet-0.17/telnet/telnet.cc:858:14:  [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.
    unsigned char tbuf[8];
data/netkit-telnet-0.17/telnet/telnet.cc:889:14:  [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.
    unsigned char tbuf[8];
data/netkit-telnet-0.17/telnet/telnet.cc:988: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.
  unsigned char cmd, tbuf[10];
data/netkit-telnet-0.17/telnet/telnet.cc:1114:10:  [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.
unsigned char slc_reply[128];
data/netkit-telnet-0.17/telnet/telnet.cc:1649:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	  char buf[128];
data/netkit-telnet-0.17/telnet/telnet.cc:1678:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[128];
data/netkit-telnet-0.17/telnet/telnet.cc:2005: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(good, thisitem, length);
data/netkit-telnet-0.17/telnet/telnet.cc:2062: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.
  unsigned char tmp[16];
data/netkit-telnet-0.17/telnet/telnet.cc:2147: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.
  unsigned char tmp[16];
data/netkit-telnet-0.17/telnet/terminal.cc:702: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(new_tc.c_cc, old_tc.c_cc, sizeof(old_tc.c_cc));
data/netkit-telnet-0.17/telnet/tn3270.cc:60: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 tline[200];
data/netkit-telnet-0.17/telnet/tn3270.cc:63: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 Ibuf[8*BUFSIZ], *Ifrontp, *Ibackp;
data/netkit-telnet-0.17/telnet/tn3270.cc:220:3:  [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(Ibuf, Ibackp, Ifrontp-Ibackp);
data/netkit-telnet-0.17/telnet/utilities.cc:60: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 NetTraceFile[256] = "(standard output)";
data/netkit-telnet-0.17/telnet/utilities.cc:81: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).
	NetTrace = fopen(file, "w");
data/netkit-telnet-0.17/telnet/utilities.cc:89:5:  [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((char *)NetTraceFile, "(standard output)");
data/netkit-telnet-0.17/telnet/utilities.cc:454:7:  [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 tbuf[64];
data/netkit-telnet-0.17/telnetd/authenc.c:38:2:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	bcopy((void *)str, (void *)nfrontp, len);
data/netkit-telnet-0.17/telnetd/ext.h:40: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 options[256];
data/netkit-telnet-0.17/telnetd/ext.h:41: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 do_dont_resp[256];
data/netkit-telnet-0.17/telnetd/ext.h:42: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 will_wont_resp[256];
data/netkit-telnet-0.17/telnetd/ext.h:82: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 ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp;
data/netkit-telnet-0.17/telnetd/ext.h:83: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 netibuf[BUFSIZ], *netip;
data/netkit-telnet-0.17/telnetd/global.c:50: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	options[256];
data/netkit-telnet-0.17/telnetd/global.c:51: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	do_dont_resp[256];
data/netkit-telnet-0.17/telnetd/global.c:52: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	will_wont_resp[256];
data/netkit-telnet-0.17/telnetd/global.c:86: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	ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp;
data/netkit-telnet-0.17/telnetd/global.c:88: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	netibuf[BUFSIZ], *netip;
data/netkit-telnet-0.17/telnetd/setproctitle.c:74: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 Argv0[128];			/* program name */
data/netkit-telnet-0.17/telnetd/setproctitle.c:116: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[2048];
data/netkit-telnet-0.17/telnetd/setproctitle.c:124:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	(void) strcat(p, ": ");
data/netkit-telnet-0.17/telnetd/slc.c:50:17:  [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 unsigned char slcbuf[NSLC*6];	/* buffer for slc negotiation */
data/netkit-telnet-0.17/telnetd/slc.c:435:6:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    bcopy(ptr, def_slcbuf, len);
data/netkit-telnet-0.17/telnetd/state.c:55:10:  [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.
unsigned char subbuffer[512], *subpointer=subbuffer, *subend=subbuffer;
data/netkit-telnet-0.17/telnetd/state.c:1026: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).
	xspeed = atoi((char *)subpointer);
data/netkit-telnet-0.17/telnetd/state.c:1031: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).
	rspeed = atoi((char *)subpointer);
data/netkit-telnet-0.17/telnetd/state.c:1037: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 terminalname[41];
data/netkit-telnet-0.17/telnetd/state.c:1315:14:  [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.
    unsigned char statusbuf[256];
data/netkit-telnet-0.17/telnetd/sys_term.c:87:5:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    bcopy(cp, (char *)&termbuf, len);
data/netkit-telnet-0.17/telnetd/sys_term.c:441:9:  [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).
    t = open(_PATH_TTY, O_RDWR);
data/netkit-telnet-0.17/telnetd/sys_term.c:521:9:  [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).
    t = open(lyne, O_RDWR|O_NOCTTY);
data/netkit-telnet-0.17/telnetd/sys_term.c:533:9:  [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).
    t = open(lyne, O_RDWR|O_NOCTTY);
data/netkit-telnet-0.17/telnetd/sys_term.c:587: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 *envinit[3];
data/netkit-telnet-0.17/telnetd/telnetd.c:82: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	ptyibuf[BUFSIZ], *ptyip = ptyibuf;
data/netkit-telnet-0.17/telnetd/telnetd.c:83: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	ptyibuf2[BUFSIZ];
data/netkit-telnet-0.17/telnetd/telnetd.c:524: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 first[256], last[256];
data/netkit-telnet-0.17/telnetd/telnetd.c:662: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 host_name[MAXHOSTNAMELEN];
data/netkit-telnet-0.17/telnetd/telnetd.c:663: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 remote_host_name[MAXHOSTNAMELEN];
data/netkit-telnet-0.17/telnetd/telnetd.c:675: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 user_name[256];
data/netkit-telnet-0.17/telnetd/telnetd.c:893:6:  [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).
	t = open(_PATH_TTY, O_RDWR);
data/netkit-telnet-0.17/telnetd/utility.c:341: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-telnet-0.17/telnetd/utility.c:362: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-telnet-0.17/telnetd/utility.c:436: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 db[100];
data/netkit-telnet-0.17/telnetd/utility.c:474: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	buff[128];
data/netkit-telnet-0.17/telnetd/utility.c:486: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 buff[3];
data/netkit-telnet-0.17/telnetd/utility.c:490: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(ISSUE_FILE, "r")) == NULL)
data/netkit-telnet-0.17/telnetd/utility.c:564: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[512];
data/netkit-telnet-0.17/telnetd/utility.c:768:7:  [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 tbuf[32];
data/netkit-telnet-0.17/telnetd/utility.c:1107: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 xbuf[30];
data/netkit-telnet-0.17/telnetd/utility.c:1151: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(bufl->buf, buf, len);
data/netkit-telnet-0.17/telnetd/utility.c:1186:3:  [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(tail->buf + m, buf, l);
data/netkit-telnet-0.17/telnetlogin/telnetlogin.c:139:8:  [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).
   i = open("/", O_RDONLY);
data/netkit-telnet-0.17/telnet/authenc.cc:110:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(result, res, length);
data/netkit-telnet-0.17/telnet/commands.cc:489: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(*cpp) + 1;
data/netkit-telnet-0.17/telnet/commands.cc:1651: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).
	(void) fgets(&line[strlen(line)], sizeof(line) - strlen(line), stdin);
data/netkit-telnet-0.17/telnet/commands.cc:1651:51:  [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).
	(void) fgets(&line[strlen(line)], sizeof(line) - strlen(line), stdin);
data/netkit-telnet-0.17/telnet/commands.cc:1842:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	hostname = new char[strlen(hostp)+1];
data/netkit-telnet-0.17/telnet/commands.cc:1846:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	hostname = new char[strlen(tmpaddr->ai_canonname)+1];
data/netkit-telnet-0.17/telnet/commands.cc:1981: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).
	if (!strncasecmp(c->getname(), name, strlen(name))) {
data/netkit-telnet-0.17/telnet/commands.cc:2102: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 l1 = strlen(m1);
data/netkit-telnet-0.17/telnet/commands.cc:2103: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 l2 = strlen(m2);
data/netkit-telnet-0.17/telnet/commands.cc:2104: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).
    int lport = strlen(port);
data/netkit-telnet-0.17/telnet/commands.cc:2129:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(line, &line[l1], sizeof(line) - l1);
data/netkit-telnet-0.17/telnet/commands.cc:2131:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(line, &line[l2], sizeof(line) - l2);
data/netkit-telnet-0.17/telnet/commands.cc:2133:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(line, &line[7], sizeof(line) - 7);
data/netkit-telnet-0.17/telnet/commands.cc:2140:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(line, &line[lport + 1], sizeof(line) - lport - 1);
data/netkit-telnet-0.17/telnet/environ.cc:28: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).
	var = strcpy(new char[strlen(vr)+1], vr);
data/netkit-telnet-0.17/telnet/environ.cc:29: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).
	value = strcpy(new char[strlen(vl)+1], vl);
data/netkit-telnet-0.17/telnet/environ.cc:90: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).
    int maxlen = sizeof(hbuf)-strlen(cp2)-1;
data/netkit-telnet-0.17/telnet/environ.cc:100:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(hbuf, h->h_name, maxlen);
data/netkit-telnet-0.17/telnet/netlink.cc:24:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    virtual int read(char *buf, int maxlen) {
data/netkit-telnet-0.17/telnet/ring.cc:205:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int l = srcbinding->read(buf+bot, top-bot);
data/netkit-telnet-0.17/telnet/ring.h:52:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	virtual int read(char *buf, int len) = 0;
data/netkit-telnet-0.17/telnet/telnet.cc:222:28:  [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).
	ring->supply_data(string, strlen(string));
data/netkit-telnet-0.17/telnet/telnet.cc:559: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(cp)>40) continue;
data/netkit-telnet-0.17/telnet/telnet.cc:582: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(fill[k])==2 && fill[k]==buf) {
data/netkit-telnet-0.17/telnet/telnet.cc:593: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 (name && strlen(name)<40) fill.add(name);
data/netkit-telnet-0.17/telnet/telnet.cc:620:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(termbuf, CUR term_names, sizeof(termbuf));
data/netkit-telnet-0.17/telnet/telnet.cc:1295:27:  [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).
  tp = opt_replyp + (vp ? strlen(vp) * 2 : 0) + strlen(ep) * 2 + 6;
data/netkit-telnet-0.17/telnet/telnet.cc:1295: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).
  tp = opt_replyp + (vp ? strlen(vp) * 2 : 0) + strlen(ep) * 2 + 6;
data/netkit-telnet-0.17/telnet/terminal.cc:216:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    virtual int read(char *buf, int maxlen) {
data/netkit-telnet-0.17/telnet/terminal.cc:298:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	r = read(tin, buf, n);
data/netkit-telnet-0.17/telnet/tn3270.cc:246: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).
    int count = strlen(s);
data/netkit-telnet-0.17/telnet/tn3270.cc:361:2:  [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.
	strcat(transcom, " ");
data/netkit-telnet-0.17/telnet/utilities.cc:681: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).
    fwrite(string, 1, strlen(string), stderr);
data/netkit-telnet-0.17/telnetd/setproctitle.c:100:28:  [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).
		LastArgv = envp[i - 1] + strlen(envp[i - 1]);
data/netkit-telnet-0.17/telnetd/setproctitle.c:102: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).
		LastArgv = argv[argc - 1] + strlen(argv[argc - 1]);
data/netkit-telnet-0.17/telnetd/setproctitle.c:107:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(Argv0, tmp, sizeof(Argv0));
data/netkit-telnet-0.17/telnetd/setproctitle.c:125: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).
	p += strlen(p);
data/netkit-telnet-0.17/telnetd/setproctitle.c:132: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).
	i = strlen(buf);
data/netkit-telnet-0.17/telnetd/state.c:1391: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).
    if (strncmp(varp, "LD_", strlen("LD_")) &&
data/netkit-telnet-0.17/telnetd/state.c:1392:27:  [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).
	strncmp(varp, "ELF_LD_", strlen("ELF_LD_")) &&
data/netkit-telnet-0.17/telnetd/state.c:1393:28:  [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).
	strncmp(varp, "AOUT_LD_", strlen("AOUT_LD_")) &&
data/netkit-telnet-0.17/telnetd/state.c:1394: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).
	strncmp(varp, "_RLD_", strlen("_RLD_")) &&
data/netkit-telnet-0.17/telnetd/telnetd.c:540: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).
	    assert(strlen(terminaltype) < sizeof(first));
data/netkit-telnet-0.17/telnetd/telnetd.c:551: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).
		assert(strlen(terminaltype) < sizeof(first));
data/netkit-telnet-0.17/telnetd/telnetd.c:570: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).
		    assert(strlen(terminaltype) < sizeof(first));
data/netkit-telnet-0.17/telnetd/telnetd.c:633: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(s) > 63) {
data/netkit-telnet-0.17/telnetd/telnetd.c:709:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(host_name, res->ai_canonname, sizeof(host_name)-1);
data/netkit-telnet-0.17/telnetd/telnetd.c:919:14:  [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.
    if (pcc) strncat(ptyibuf2, ptyip, pcc+1);
data/netkit-telnet-0.17/telnetd/telnetd.c:921: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).
    pcc = strlen(ptyip);
data/netkit-telnet-0.17/telnetd/telnetd.c:1031:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ncc = read(net, netibuf, sizeof (netibuf));
data/netkit-telnet-0.17/telnetd/telnetd.c:1038:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    ncc = read(net, netibuf, sizeof (netibuf));
data/netkit-telnet-0.17/telnetd/telnetd.c:1042:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ncc = read(net, netibuf, sizeof (netibuf));
data/netkit-telnet-0.17/telnetd/telnetd.c:1046:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    ncc = read(net, netibuf, sizeof (netibuf));
data/netkit-telnet-0.17/telnetd/telnetd.c:1065:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    pcc = read(p, ptyibuf, BUFSIZ);
data/netkit-telnet-0.17/telnetd/utility.c:82:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ncc = read(net, netibuf, sizeof(netibuf));
data/netkit-telnet-0.17/telnetd/utility.c:354:28:  [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).
	(void) write(f, buf, (int)strlen(buf));
data/netkit-telnet-0.17/telnetd/utility.c:380:28:  [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).
	res = realloc(editedhost, strlen(pat) + strlen(host) + 1);
data/netkit-telnet-0.17/telnetd/utility.c:380: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).
	res = realloc(editedhost, strlen(pat) + strlen(host) + 1);
data/netkit-telnet-0.17/telnetd/utility.c:493:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				while ((c = fgetc(fp)) != EOF) {
data/netkit-telnet-0.17/telnetd/utility.c:496:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
							c = fgetc(fp);
data/netkit-telnet-0.17/telnetd/utility.c:501:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
						c = fgetc(fp);
data/netkit-telnet-0.17/telnetd/utility.c:1257:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read: 0, write: netwrite, seek: 0, close: 0
data/netkit-telnet-0.17/telnetlogin/telnetlogin.c:86: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(termtype) > 32) return -1;
data/netkit-telnet-0.17/telnetlogin/telnetlogin.c:170: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).
      size_t testlen = strlen(testenv);
data/netkit-telnet-0.17/telnetlogin/telnetlogin.c:173: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).
	 size_t oklen = strlen(okenv);

ANALYSIS SUMMARY:

Hits = 205
Lines analyzed = 15730 in approximately 0.42 seconds (37037 lines/second)
Physical Source Lines of Code (SLOC) = 10714
Hits@level = [0] 347 [1]  65 [2]  92 [3]  12 [4]  30 [5]   6
Hits@level+ = [0+] 552 [1+] 205 [2+] 140 [3+]  48 [4+]  36 [5+]   6
Hits/KSLOC@level+ = [0+] 51.5214 [1+] 19.1338 [2+] 13.067 [3+] 4.48012 [4+] 3.36009 [5+] 0.560015
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.