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-rsh-0.17/rcp/pathnames.h
Examining data/netkit-rsh-0.17/rcp/rcp.c
Examining data/netkit-rsh-0.17/version.h
Examining data/netkit-rsh-0.17/rexec/rexec.c
Examining data/netkit-rsh-0.17/rexecd/rexecd.c
Examining data/netkit-rsh-0.17/rlogin/des_rw.c
Examining data/netkit-rsh-0.17/rlogin/rlogin.c
Examining data/netkit-rsh-0.17/rlogind/logwtmp.h
Examining data/netkit-rsh-0.17/rlogind/pathnames.h
Examining data/netkit-rsh-0.17/rlogind/sockconv.c
Examining data/netkit-rsh-0.17/rlogind/auth.c
Examining data/netkit-rsh-0.17/rlogind/network.c
Examining data/netkit-rsh-0.17/rlogind/rlogind.c
Examining data/netkit-rsh-0.17/rlogind/rlogind.h
Examining data/netkit-rsh-0.17/rsh/pathnames.h
Examining data/netkit-rsh-0.17/rsh/rsh.c
Examining data/netkit-rsh-0.17/rshd/rshd.c

FINAL RESULTS:

data/netkit-rsh-0.17/rcp/rcp.c:790:12:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
					(void)chmod(np, mode);
data/netkit-rsh-0.17/rlogind/rlogind.c:291: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(line, 0600);
data/netkit-rsh-0.17/rlogind/rlogind.c:292: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(line, 0, 0);
data/netkit-rsh-0.17/rlogind/rlogind.c:296: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(line, 0666);
data/netkit-rsh-0.17/rlogind/rlogind.c:297: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(line, 0, 0);
data/netkit-rsh-0.17/rcp/rcp.c:769: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(newbuf, targ);
data/netkit-rsh-0.17/rcp/rcp.c:777: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(namebuf + nbase, cp);
data/netkit-rsh-0.17/rcp/rcp.c:913: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(fp, fmt, ap);
data/netkit-rsh-0.17/rcp/rcp.c:918:3:  [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(stderr, fmt, ap);
data/netkit-rsh-0.17/rexec/rexec.c:214: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.
    passwd = getpass("Password: ");
data/netkit-rsh-0.17/rexec/rexec.c:322:12:  [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(*command, argv[ind]);
data/netkit-rsh-0.17/rexecd/rexecd.c:360:11:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
		namep = crypt(pass, pwd->pw_passwd);
data/netkit-rsh-0.17/rexecd/rexecd.c:372:2:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	crypt("flurgle", pwd->pw_passwd);
data/netkit-rsh-0.17/rexecd/rexecd.c:452: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(path, _PATH_DEFPATH);
data/netkit-rsh-0.17/rexecd/rexecd.c:468:2:  [4] (shell) execle:
  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.
	execle(theshell, cp2, "-c", cmdbuf, 0, myenviron);
data/netkit-rsh-0.17/rlogind/rlogind.c:343: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(termenv[0], termtype);
data/netkit-rsh-0.17/rlogind/rlogind.c:350:2:  [4] (shell) execle:
  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.
	execle(_PATH_LOGIN, "login", "-p",
data/netkit-rsh-0.17/rlogind/rlogind.c:360:2:  [4] (shell) execle:
  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.
	execle(_PATH_LOGIN, "login", "-p",
data/netkit-rsh-0.17/rsh/rsh.c:342: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).
		for (p = strcpy(p, *ap); *p; ++p);
data/netkit-rsh-0.17/rshd/rshd.c:132:5:  [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.
    vsnprintf(bp, sizeof(buf)-1, fmt, ap);
data/netkit-rsh-0.17/rshd/rshd.c:486:27:  [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 (pwd->pw_uid != 0 && !access(_PATH_NOLOGIN, F_OK)) {
data/netkit-rsh-0.17/rshd/rshd.c:549: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(path, _PATH_DEFPATH);
data/netkit-rsh-0.17/rshd/rshd.c:578:2:  [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, shellname, "-c", cmdbuf, 0);
data/netkit-rsh-0.17/rcp/rcp.c:119: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, OPTIONS)) != EOF)
data/netkit-rsh-0.17/rexec/rexec.c:285:17:  [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 ((opt = getopt(argc, argv, OPTIONS)) > 0)
data/netkit-rsh-0.17/rlogin/des_rw.c:48:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
extern long		random();
data/netkit-rsh-0.17/rlogin/des_rw.c:168:4:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
			srandom((int) time((long *)0));
data/netkit-rsh-0.17/rlogin/des_rw.c:170:13:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		garbage = random();
data/netkit-rsh-0.17/rlogin/rlogin.c:215: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 - argoff, argv + argoff, OPTIONS)) != EOF)
data/netkit-rsh-0.17/rlogin/rlogin.c:292:6:  [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.
	t = getenv("TERM");
data/netkit-rsh-0.17/rlogind/rlogind.c:449:18:  [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, "afhLln")) != EOF) {
data/netkit-rsh-0.17/rsh/rsh.c:112: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 - argoff, argv + argoff, OPTIONS)) != EOF)
data/netkit-rsh-0.17/rshd/rshd.c:680: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, OPTIONS)) != EOF) {
data/netkit-rsh-0.17/rcp/rcp.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 cmd[CMDNEEDS];		/* must hold "rcp -r -p -d\0" */
data/netkit-rsh-0.17/rcp/rcp.c:418:13:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
	if ((pid = vfork()) == 0) {
data/netkit-rsh-0.17/rcp/rcp.c:419: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[4];
data/netkit-rsh-0.17/rcp/rcp.c:433: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(&argsbar, &argsfoo, sizeof(argsfoo));
data/netkit-rsh-0.17/rcp/rcp.c:456: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 *last, *name, buf[BUFSIZ];
data/netkit-rsh-0.17/rcp/rcp.c:536: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 *last, *vect[1], *path;
data/netkit-rsh-0.17/rcp/rcp.c:548: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 buf[128];
data/netkit-rsh-0.17/rcp/rcp.c:590: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 ch, resp, rbuf[BUFSIZ];
data/netkit-rsh-0.17/rcp/rcp.c:647: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 *np, *vect[1], buf[BUFSIZ];
data/netkit-rsh-0.17/rcp/rcp.c:765:6:  [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(newbuf, namebuf, nbase);
data/netkit-rsh-0.17/rexec/rexec.c:203:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ( ( term_in = fopen("/dev/tty","r+")) == NULL)
data/netkit-rsh-0.17/rexec/rexec.c:349: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[BUFLEN];
data/netkit-rsh-0.17/rexecd/rexecd.c:152: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 hbuf[NI_MAXHOST];
data/netkit-rsh-0.17/rexecd/rexecd.c:168: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	username[20] = "USER=";
data/netkit-rsh-0.17/rexecd/rexecd.c:169: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	homedir[64] = "HOME=";
data/netkit-rsh-0.17/rexecd/rexecd.c:170: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	shell[64] = "SHELL=";
data/netkit-rsh-0.17/rexecd/rexecd.c:171: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	path[sizeof(_PATH_DEFPATH) + sizeof("PATH=")] = "PATH=";
data/netkit-rsh-0.17/rexecd/rexecd.c:237: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[16], pass[16];
data/netkit-rsh-0.17/rexecd/rexecd.c:250: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-rsh-0.17/rexecd/rexecd.c:259:12:  [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).
	{ int t = open(_PATH_TTY, 2);
data/netkit-rsh-0.17/rexecd/rexecd.c:381:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(_PATH_FTPUSERS, "r");
data/netkit-rsh-0.17/rlogin/des_rw.c:49: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	des_inbuf[10240], storage[10240], *store_ptr;
data/netkit-rsh-0.17/rlogin/des_rw.c:96:10:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(void) bcopy(store_ptr, buf, len);
data/netkit-rsh-0.17/rlogin/des_rw.c:101:10:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(void) bcopy(store_ptr, buf, nstored);
data/netkit-rsh-0.17/rlogin/des_rw.c:140:10:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(void) bcopy(store_ptr, buf, len);
data/netkit-rsh-0.17/rlogin/des_rw.c:145:10:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(void) bcopy(store_ptr, buf, nstored);
data/netkit-rsh-0.17/rlogin/des_rw.c:153: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 des_outbuf[10240];	/* > longest write */
data/netkit-rsh-0.17/rlogin/des_rw.c:162: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	garbage_buf[8];
data/netkit-rsh-0.17/rlogin/des_rw.c:172:10:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(void) bcopy(&garbage, garbage_buf, MIN(sizeof(long),8));
data/netkit-rsh-0.17/rlogin/des_rw.c:174:10:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(void) bcopy(buf, garbage_buf + 8 - len, len);
data/netkit-rsh-0.17/rlogin/rlogin.c:187: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 *host, *p, *user, term[1024];
data/netkit-rsh-0.17/rlogin/rlogin.c:543: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[8];
data/netkit-rsh-0.17/rlogin/rlogin.c:595: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 obuf[4 + sizeof (struct winsize)];
data/netkit-rsh-0.17/rlogin/rlogin.c:618: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 rcvbuf[8 * 1024];
data/netkit-rsh-0.17/rlogin/rlogin.c:626: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 waste[BUFSIZ], mark;
data/netkit-rsh-0.17/rlogin/rlogin.c:799: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(&tios, &defmodes, sizeof(defmodes));
data/netkit-rsh-0.17/rlogind/network.c:58: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 naddr[NI_MAXHOST];
data/netkit-rsh-0.17/rlogind/network.c:59: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 raddr[NI_MAXHOST];
data/netkit-rsh-0.17/rlogind/network.c:60: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 hbuf[NI_MAXHOST];
data/netkit-rsh-0.17/rlogind/network.c:79:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
			strcpy(hbuf, "???");
data/netkit-rsh-0.17/rlogind/network.c:98: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(naddr, "???");
data/netkit-rsh-0.17/rlogind/network.c:201:6:  [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 lbuf[BUFSIZ];
data/netkit-rsh-0.17/rlogind/rlogind.c:92: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[BUFSIZ];
data/netkit-rsh-0.17/rlogind/rlogind.c:139: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 magic[2] = { (char)0377, (char)0377 };
data/netkit-rsh-0.17/rlogind/rlogind.c:141: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 pibuf[1024+1], fibuf[1024], *pbp = NULL, *fbp = NULL;
data/netkit-rsh-0.17/rlogind/rlogind.c:225:9:  [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+nn, cp, left);
data/netkit-rsh-0.17/rlogind/rlogind.c:313:19:  [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).
	cfsetispeed(&tt, atoi(x));
data/netkit-rsh-0.17/rlogind/rlogind.c:314:19:  [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).
	cfsetospeed(&tt, atoi(x));
data/netkit-rsh-0.17/rlogind/rlogind.c:336: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 *termenv[2];
data/netkit-rsh-0.17/rlogind/rlogind.c:342:2:  [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(termenv[0], "TERM=");
data/netkit-rsh-0.17/rlogind/rlogind.c:386: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 lusername[32], rusername[32], termtype[256];
data/netkit-rsh-0.17/rlogind/sockconv.c:60: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[INPUTSIZE];
data/netkit-rsh-0.17/rsh/rsh.c:242: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-rsh-0.17/rshd/rshd.c:102: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	username[20] = "USER=";
data/netkit-rsh-0.17/rshd/rshd.c:103: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	homedir[64] = "HOME=";
data/netkit-rsh-0.17/rshd/rshd.c:104: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	shell[64] = "SHELL=";
data/netkit-rsh-0.17/rshd/rshd.c:105: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	path[100] = "PATH=";
data/netkit-rsh-0.17/rshd/rshd.c:128: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[BUFSIZ], *bp = buf;
data/netkit-rsh-0.17/rshd/rshd.c:205: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[BUFSIZ], sig;
data/netkit-rsh-0.17/rshd/rshd.c:334: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 hbuf[NI_MAXHOST];
data/netkit-rsh-0.17/rshd/rshd.c:335: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 naddr[NI_MAXHOST];
data/netkit-rsh-0.17/rshd/rshd.c:336: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 raddr[NI_MAXHOST];
data/netkit-rsh-0.17/rshd/rshd.c:378:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
			strcpy(naddr, "???");
data/netkit-rsh-0.17/rshd/rshd.c:407: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 locuser[16], remuser[16];
data/netkit-rsh-0.17/rshd/rshd.c:616: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 lbuf[BUFSIZ+1], *lp;
data/netkit-rsh-0.17/rcp/rcp.c:237: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).
			len = strlen(_PATH_RSH) + strlen(argv[i]) +
data/netkit-rsh-0.17/rcp/rcp.c:237: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).
			len = strlen(_PATH_RSH) + strlen(argv[i]) +
data/netkit-rsh-0.17/rcp/rcp.c:238:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    strlen(src) + (tuser ? strlen(tuser) : 0) +
data/netkit-rsh-0.17/rcp/rcp.c:238: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).
			    strlen(src) + (tuser ? strlen(tuser) : 0) +
data/netkit-rsh-0.17/rcp/rcp.c:239:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    strlen(thost) + strlen(targ) + CMDNEEDS + 20;
data/netkit-rsh-0.17/rcp/rcp.c:239: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).
			    strlen(thost) + strlen(targ) + CMDNEEDS + 20;
data/netkit-rsh-0.17/rcp/rcp.c:264:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				len = strlen(targ) + CMDNEEDS + 20;
data/netkit-rsh-0.17/rcp/rcp.c:308: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).
			len = strlen(_PATH_CP) + strlen(argv[i]) +
data/netkit-rsh-0.17/rcp/rcp.c:308: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).
			len = strlen(_PATH_CP) + strlen(argv[i]) +
data/netkit-rsh-0.17/rcp/rcp.c:309:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    strlen(argv[argc - 1]) + 20;
data/netkit-rsh-0.17/rcp/rcp.c:334: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(src) + CMDNEEDS + 20;
data/netkit-rsh-0.17/rcp/rcp.c:495: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).
			(void)write(rem, buf, (int)strlen(buf));
data/netkit-rsh-0.17/rcp/rcp.c:504: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).
		(void)write(rem, buf, (int)strlen(buf));
data/netkit-rsh-0.17/rcp/rcp.c:518:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (readerr == 0 && read(f, bp->buf, amt) != amt)
data/netkit-rsh-0.17/rcp/rcp.c:551: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).
		(void)write(rem, buf, (int)strlen(buf));
data/netkit-rsh-0.17/rcp/rcp.c:562: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).
	(void)write(rem, path, (int)strlen(path));
data/netkit-rsh-0.17/rcp/rcp.c:592:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(rem, &resp, sizeof(resp)) != sizeof(resp))
data/netkit-rsh-0.17/rcp/rcp.c:605:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (read(rem, &ch, sizeof(ch)) != sizeof(ch))
data/netkit-rsh-0.17/rcp/rcp.c:656:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	mask = umask(0);
data/netkit-rsh-0.17/rcp/rcp.c:658:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		(void)umask(mask);
data/netkit-rsh-0.17/rcp/rcp.c:671:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(rem, cp, 1) <= 0) {
data/netkit-rsh-0.17/rcp/rcp.c:679:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (read(rem, &ch, sizeof(ch)) != sizeof(ch))
data/netkit-rsh-0.17/rcp/rcp.c:687:34:  [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(2, buf + 1, (int)strlen(buf + 1));
data/netkit-rsh-0.17/rcp/rcp.c:757:15:  [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 need = strlen(targ) + strlen(cp) + 2;
data/netkit-rsh-0.17/rcp/rcp.c:757: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).
			int need = strlen(targ) + strlen(cp) + 2;
data/netkit-rsh-0.17/rcp/rcp.c:771:7:  [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(newbuf, "/");
data/netkit-rsh-0.17/rcp/rcp.c:772: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).
					nbase = strlen(newbuf);
data/netkit-rsh-0.17/rcp/rcp.c:823:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				j = read(rem, cp, amt);
data/netkit-rsh-0.17/rexec/rexec.c:212:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    user_name[strlen(user_name)-1] = '\0'; /* Hopefully fgets always adds
data/netkit-rsh-0.17/rexec/rexec.c:318: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(argv[ind])+1;
data/netkit-rsh-0.17/rexec/rexec.c:321:39:  [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.
  for ( ind = optind; (ind < argc) && strcat(*command," "); ++ind)
data/netkit-rsh-0.17/rexec/rexec.c:353:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if ( (sock_read = read(fd_from, buffer, BUFLEN)) < 0 )
data/netkit-rsh-0.17/rexecd/rexecd.c:274:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(0, &c, 1) != 1)
data/netkit-rsh-0.17/rexecd/rexecd.c:454:2:  [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(homedir, pwd->pw_dir, sizeof(homedir)-6);
data/netkit-rsh-0.17/rexecd/rexecd.c:455:2:  [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(shell, theshell, sizeof(shell)-7);
data/netkit-rsh-0.17/rexecd/rexecd.c:456:2:  [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(username, pwd->pw_name, sizeof(username)-6);
data/netkit-rsh-0.17/rexecd/rexecd.c:478: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).
	write(2, msg, strlen(msg));
data/netkit-rsh-0.17/rexecd/rexecd.c:493:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		goto read;
data/netkit-rsh-0.17/rexecd/rexecd.c:518:1:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
read:
data/netkit-rsh-0.17/rexecd/rexecd.c:519:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(0, p, 1) != 1)
data/netkit-rsh-0.17/rlogin/rlogin.c:494:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n = read(STDIN_FILENO, &c, 1);
data/netkit-rsh-0.17/rlogin/rlogin.c:639:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				n = read(rem, rcvbuf + rcvcnt,
data/netkit-rsh-0.17/rlogin/rlogin.c:645:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				n = read(rem, waste, sizeof(waste));
data/netkit-rsh-0.17/rlogin/rlogin.c:681:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			n = read(rem, waste, sizeof (waste));
data/netkit-rsh-0.17/rlogin/rlogin.c:749:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			rcvcnt = read(rem, rcvbuf, sizeof (rcvbuf));
data/netkit-rsh-0.17/rlogin/rlogin.c:912:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((len = strlen(p)) == 1)    /* use any single char, including '\' */
data/netkit-rsh-0.17/rlogind/auth.c:152:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(localuser, ln, localusersize-1);
data/netkit-rsh-0.17/rlogind/network.c:171:2:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	read(f, &c, 1);
data/netkit-rsh-0.17/rlogind/rlogind.c:106:19:  [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).
    write(f, buf, strlen(buf));
data/netkit-rsh-0.17/rlogind/rlogind.c:194:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			cc = read(p, &cntl, 1);
data/netkit-rsh-0.17/rlogind/rlogind.c:205:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				fcc = read(f, fibuf, sizeof(fibuf));
data/netkit-rsh-0.17/rlogind/rlogind.c:243:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			pcc = read(p, pibuf, sizeof (pibuf));
data/netkit-rsh-0.17/rlogind/rlogind.c:340: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).
    termenv[0] = malloc(strlen(termtype)+6);
data/netkit-rsh-0.17/rlogind/rlogind.c:374:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(STDIN_FILENO, &c, 1) != 1) exit(1);
data/netkit-rsh-0.17/rlogind/sockconv.c:68:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(0, &buffer[charsRead], 1);
data/netkit-rsh-0.17/rsh/rsh.c:250:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if ((cc = read(0, buf, sizeof buf)) <= 0)
data/netkit-rsh-0.17/rsh/rsh.c:301:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				cc = read(rfd2, buf, sizeof buf);
data/netkit-rsh-0.17/rsh/rsh.c:309:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				cc = read(rem, buf, sizeof buf);
data/netkit-rsh-0.17/rsh/rsh.c:334: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).
		cc += strlen(*ap) + 1;
data/netkit-rsh-0.17/rshd/rshd.c:134:19:  [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).
    write(2, buf, strlen(buf));
data/netkit-rsh-0.17/rshd/rshd.c:161:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		goto read;
data/netkit-rsh-0.17/rshd/rshd.c:186:1:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
read:
data/netkit-rsh-0.17/rshd/rshd.c:187:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(0, p, 1) != 1)
data/netkit-rsh-0.17/rshd/rshd.c:197:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(0, &c, 1) != 1) exit(1);
data/netkit-rsh-0.17/rshd/rshd.c:227:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    cc = read(sock, &sig, 1);
data/netkit-rsh-0.17/rshd/rshd.c:235:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    cc = read(pype, buf, sizeof(buf));
data/netkit-rsh-0.17/rshd/rshd.c:546:2:  [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(homedir, pwd->pw_dir, sizeof(homedir)-6);
data/netkit-rsh-0.17/rshd/rshd.c:551:2:  [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(shell, theshell, sizeof(shell)-7);
data/netkit-rsh-0.17/rshd/rshd.c:554:2:  [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(username, pwd->pw_name, sizeof(username)-6);

ANALYSIS SUMMARY:

Hits = 167
Lines analyzed = 5356 in approximately 0.21 seconds (25316 lines/second)
Physical Source Lines of Code (SLOC) = 3825
Hits@level = [0] 130 [1]  69 [2]  65 [3]  10 [4]  18 [5]   5
Hits@level+ = [0+] 297 [1+] 167 [2+]  98 [3+]  33 [4+]  23 [5+]   5
Hits/KSLOC@level+ = [0+] 77.6471 [1+] 43.6601 [2+] 25.6209 [3+] 8.62745 [4+] 6.01307 [5+] 1.30719
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.