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/tcsh-6.21.00/config_f.h
Examining data/tcsh-6.21.00/dotlock.c
Examining data/tcsh-6.21.00/dotlock.h
Examining data/tcsh-6.21.00/ed.chared.c
Examining data/tcsh-6.21.00/ed.decls.h
Examining data/tcsh-6.21.00/ed.defns.c
Examining data/tcsh-6.21.00/ed.h
Examining data/tcsh-6.21.00/ed.init.c
Examining data/tcsh-6.21.00/ed.inputl.c
Examining data/tcsh-6.21.00/ed.refresh.c
Examining data/tcsh-6.21.00/ed.screen.c
Examining data/tcsh-6.21.00/ed.term.c
Examining data/tcsh-6.21.00/ed.term.h
Examining data/tcsh-6.21.00/ed.xmap.c
Examining data/tcsh-6.21.00/gethost.c
Examining data/tcsh-6.21.00/glob.c
Examining data/tcsh-6.21.00/glob.h
Examining data/tcsh-6.21.00/ma.setp.c
Examining data/tcsh-6.21.00/mi.termios.c
Examining data/tcsh-6.21.00/mi.varargs.h
Examining data/tcsh-6.21.00/mi.wait.h
Examining data/tcsh-6.21.00/patchlevel.h
Examining data/tcsh-6.21.00/pathnames.h
Examining data/tcsh-6.21.00/sh.c
Examining data/tcsh-6.21.00/sh.char.c
Examining data/tcsh-6.21.00/sh.char.h
Examining data/tcsh-6.21.00/sh.decls.h
Examining data/tcsh-6.21.00/sh.dir.c
Examining data/tcsh-6.21.00/sh.dir.h
Examining data/tcsh-6.21.00/sh.dol.c
Examining data/tcsh-6.21.00/sh.err.c
Examining data/tcsh-6.21.00/sh.exec.c
Examining data/tcsh-6.21.00/sh.exp.c
Examining data/tcsh-6.21.00/sh.file.c
Examining data/tcsh-6.21.00/sh.func.c
Examining data/tcsh-6.21.00/sh.glob.c
Examining data/tcsh-6.21.00/sh.h
Examining data/tcsh-6.21.00/sh.hist.c
Examining data/tcsh-6.21.00/sh.init.c
Examining data/tcsh-6.21.00/sh.lex.c
Examining data/tcsh-6.21.00/sh.misc.c
Examining data/tcsh-6.21.00/sh.parse.c
Examining data/tcsh-6.21.00/sh.print.c
Examining data/tcsh-6.21.00/sh.proc.c
Examining data/tcsh-6.21.00/sh.proc.h
Examining data/tcsh-6.21.00/sh.sem.c
Examining data/tcsh-6.21.00/sh.set.c
Examining data/tcsh-6.21.00/sh.time.c
Examining data/tcsh-6.21.00/sh.types.h
Examining data/tcsh-6.21.00/snames.h
Examining data/tcsh-6.21.00/tc.alloc.c
Examining data/tcsh-6.21.00/tc.bind.c
Examining data/tcsh-6.21.00/tc.const.c
Examining data/tcsh-6.21.00/tc.decls.h
Examining data/tcsh-6.21.00/tc.disc.c
Examining data/tcsh-6.21.00/tc.func.c
Examining data/tcsh-6.21.00/tc.h
Examining data/tcsh-6.21.00/tc.nls.c
Examining data/tcsh-6.21.00/tc.nls.h
Examining data/tcsh-6.21.00/tc.os.c
Examining data/tcsh-6.21.00/tc.os.h
Examining data/tcsh-6.21.00/tc.printf.c
Examining data/tcsh-6.21.00/tc.prompt.c
Examining data/tcsh-6.21.00/tc.sched.c
Examining data/tcsh-6.21.00/tc.sig.c
Examining data/tcsh-6.21.00/tc.sig.h
Examining data/tcsh-6.21.00/tc.str.c
Examining data/tcsh-6.21.00/tc.vers.c
Examining data/tcsh-6.21.00/tc.wait.h
Examining data/tcsh-6.21.00/tc.who.c
Examining data/tcsh-6.21.00/tw.color.c
Examining data/tcsh-6.21.00/tw.comp.c
Examining data/tcsh-6.21.00/tw.decls.h
Examining data/tcsh-6.21.00/tw.h
Examining data/tcsh-6.21.00/tw.help.c
Examining data/tcsh-6.21.00/tw.init.c
Examining data/tcsh-6.21.00/tw.parse.c
Examining data/tcsh-6.21.00/tw.spell.c
Examining data/tcsh-6.21.00/vms.termcap.c
Examining data/tcsh-6.21.00/win32/bogus.c
Examining data/tcsh-6.21.00/win32/clip.c
Examining data/tcsh-6.21.00/win32/console.c
Examining data/tcsh-6.21.00/win32/dirent.c
Examining data/tcsh-6.21.00/win32/dirent.h
Examining data/tcsh-6.21.00/win32/fork.c
Examining data/tcsh-6.21.00/win32/forkdata.h
Examining data/tcsh-6.21.00/win32/globals.c
Examining data/tcsh-6.21.00/win32/io.c
Examining data/tcsh-6.21.00/win32/msg/stubdll.c
Examining data/tcsh-6.21.00/win32/msg/test.c
Examining data/tcsh-6.21.00/win32/nt.bind.c
Examining data/tcsh-6.21.00/win32/nt.char.c
Examining data/tcsh-6.21.00/win32/nt.const.c
Examining data/tcsh-6.21.00/win32/nt.screen.c
Examining data/tcsh-6.21.00/win32/nt.who.c
Examining data/tcsh-6.21.00/win32/ntb1.c
Examining data/tcsh-6.21.00/win32/ntb2.c
Examining data/tcsh-6.21.00/win32/ntfunc.c
Examining data/tcsh-6.21.00/win32/ntport.h
Examining data/tcsh-6.21.00/win32/ps.c
Examining data/tcsh-6.21.00/win32/signal.c
Examining data/tcsh-6.21.00/win32/signal.h
Examining data/tcsh-6.21.00/win32/stdio.c
Examining data/tcsh-6.21.00/win32/support.c
Examining data/tcsh-6.21.00/win32/version.h

FINAL RESULTS:

data/tcsh-6.21.00/sh.misc.c:537:27:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
    while ((size_t)(res = readlink(path, buf, size)) == size) {
data/tcsh-6.21.00/tc.os.h:557:12:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
extern int readlink (const char *, char *, size_t);
data/tcsh-6.21.00/gethost.c:38:10:  [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 system __system
data/tcsh-6.21.00/gethost.c: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.
# undef system
data/tcsh-6.21.00/ma.setp.c:356:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    (void) strcpy(new + 1, localsyspath);
data/tcsh-6.21.00/ma.setp.c:357:13:  [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(new, pe->psuf);
data/tcsh-6.21.00/ma.setp.c:359:9:  [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(new, pe->pdef);
data/tcsh-6.21.00/ma.setp.c:399:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    (void) strcpy(new, localsyspath);
data/tcsh-6.21.00/ma.setp.c:400:13:  [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(new, pe->psuf);
data/tcsh-6.21.00/ma.setp.c:460:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	(void) strcpy(new, key);
data/tcsh-6.21.00/ma.setp.c:461:9:  [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(new, pe->psuf);
data/tcsh-6.21.00/ma.setp.c:562:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	(void) strcpy(new, key);
data/tcsh-6.21.00/ma.setp.c:563:9:  [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(new, pe->psuf);
data/tcsh-6.21.00/ma.setp.c:584: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(realkey, key);
data/tcsh-6.21.00/ma.setp.c:585:9:  [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(realkey, pe->psuf);
data/tcsh-6.21.00/sh.dol.c:954: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(dot, TMP_TEMPLATE);
data/tcsh-6.21.00/sh.exec.c:388:9:  [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.
	(void) execv(f, t);
data/tcsh-6.21.00/sh.exec.c:488:9:  [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.
	(void) execv(f, t);
data/tcsh-6.21.00/sh.exec.c:905:8:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	      access(strname, X_OK) == 0
data/tcsh-6.21.00/sh.exp.c:95:12:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    return access(name, mode);
data/tcsh-6.21.00/sh.exp.c:111:9:  [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.
	return access(name, mode);
data/tcsh-6.21.00/sh.exp.c:116:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(name, mode) == 0) {
data/tcsh-6.21.00/sh.func.c:309:12:  [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.
    (void) execv(_PATH_BIN_LOGIN, p);
data/tcsh-6.21.00/sh.func.c:310:12:  [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.
    (void) execv(_PATH_USRBIN_LOGIN, p);
data/tcsh-6.21.00/sh.func.c:332:12:  [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.
    (void) execv(_PATH_BIN_NEWGRP, p);
data/tcsh-6.21.00/sh.func.c:333:12:  [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.
    (void) execv(_PATH_USRBIN_NEWGRP, p);
data/tcsh-6.21.00/sh.h:1099:25:  [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).
#define Strcat(a, b)  		strcat(a, b)
data/tcsh-6.21.00/sh.h:1101:25:  [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).
#define Strcpy(a, b)  		strcpy(a, b)
data/tcsh-6.21.00/sh.h:1122:25:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
#define Strcat(a, b)  		wcscat(a, b)
data/tcsh-6.21.00/sh.h:1124:25:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
#define Strcpy(a, b)  		wcscpy(a, b)
data/tcsh-6.21.00/tc.func.c:674:18:  [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.
    extern char *crypt ();
data/tcsh-6.21.00/tc.func.c:716:27:  [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.
# define XCRYPT(pw, a, b) crypt(a, b)
data/tcsh-6.21.00/tc.func.c:734:27:  [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.
# define XCRYPT(pw, a, b) crypt(a, b)
data/tcsh-6.21.00/tc.os.c:132: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(spaths[i], short2str(pathvars[i]));
data/tcsh-6.21.00/tc.os.c:134:9:  [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(spaths[i], val);
data/tcsh-6.21.00/tc.printf.c:461:1:  [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(FILE *fp, const char* fmt, ...)
data/tcsh-6.21.00/tc.printf.c:472:1:  [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(FILE *fp, const char *fmt, va_list va)
data/tcsh-6.21.00/tc.sched.c:73:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    extern char *sprintf();
data/tcsh-6.21.00/tc.sched.c:74:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(kludge, CGETS(24, 1, "kludge"));
data/tcsh-6.21.00/tc.who.c:439: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(wp->who_name, wp->who_new);
data/tcsh-6.21.00/tc.who.c:446: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(wp->who_name, wp->who_new);
data/tcsh-6.21.00/tw.spell.c:149:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(p, F_OK) == 0) {
data/tcsh-6.21.00/vms.termcap.c:84:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(stderr, CGETS(31, 1,
data/tcsh-6.21.00/vms.termcap.c:86:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(stderr, CGETS(31, 2, "Can't open %s.\n"), termfile);
data/tcsh-6.21.00/vms.termcap.c:112:2:  [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(stderr, CGETS(31, 3, "Found %s in %s.\n"), name, termfile);
data/tcsh-6.21.00/vms.termcap.c:125:2:  [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(stderr,CGETS(31, 3, "Found %s in %s.\n"), name, termfile);
data/tcsh-6.21.00/vms.termcap.c:135:2:  [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(stderr,CGETS(31, 4, "No match found for %s in file %s\n"),
data/tcsh-6.21.00/win32/ntport.h:114:9:  [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.
#define execv(a,b)            nt_exec((a),(b))
data/tcsh-6.21.00/win32/ntport.h:132:9:  [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 fprintf               nt_fprintf
data/tcsh-6.21.00/win32/ntport.h:150:9:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define printf                nt_printf
data/tcsh-6.21.00/win32/ntport.h:151:9:  [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.
#define access                nt_access
data/tcsh-6.21.00/ed.refresh.c:89:17:  [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 ((dtty = getenv("DEBUGTTY"))) {
data/tcsh-6.21.00/ed.screen.c:1415:11:  [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.
    ptr = getenv("TERM");
data/tcsh-6.21.00/ed.screen.c:1443:7:  [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.
		    getenv("TERM"));
data/tcsh-6.21.00/ed.screen.c:1609: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.
	if (getenv("COLUMNS")) {
data/tcsh-6.21.00/ed.screen.c:1616: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.
	if (getenv("LINES")) {
data/tcsh-6.21.00/ed.screen.c:1623:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ((tptr = getenv("TERMCAP")) != NULL) {
data/tcsh-6.21.00/gethost.c:37:10:  [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.
# define getopt __getopt
data/tcsh-6.21.00/gethost.c:44:9:  [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.
# undef getopt
data/tcsh-6.21.00/sh.c:187: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.
    if ((old = getenv("NLSPATH")) != NULL)
data/tcsh-6.21.00/sh.c:404:19:  [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.
    NoNLSRebind = getenv("NOREBIND") != NULL;
data/tcsh-6.21.00/sh.c:434:17:  [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.
    AsciiOnly = getenv("LANG") == NULL && getenv("LC_CTYPE") == NULL;
data/tcsh-6.21.00/sh.c:434:43:  [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.
    AsciiOnly = getenv("LANG") == NULL && getenv("LC_CTYPE") == NULL;
data/tcsh-6.21.00/sh.c:555:7:  [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("DISPLAY") == NULL) {
data/tcsh-6.21.00/sh.c:604:17:  [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 (((tcp = getenv("HOME")) != NULL && strcmp (tcp, "/data") != 0)
data/tcsh-6.21.00/sh.c:605: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.
	|| (tcp = getenv("EXTERNAL_STORAGE")) != NULL) {
data/tcsh-6.21.00/sh.c:611: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.
    if ((tcp = getenv("HOME")) != NULL)
data/tcsh-6.21.00/sh.c:650: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.
	cln = getenv("LOGNAME");
data/tcsh-6.21.00/sh.c:651: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.
	cus = getenv("USER");
data/tcsh-6.21.00/sh.c:665: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.
	cgr = getenv("GROUP");
data/tcsh-6.21.00/sh.c:700: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.
    if ((tcp = getenv("SYSTYPE")) == NULL)
data/tcsh-6.21.00/sh.c:725: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.
    if ((tcp = getenv("TERM")) != NULL) {
data/tcsh-6.21.00/sh.c:734:20:  [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.
	editing = ((tcp = getenv("EMACS")) == NULL || strcmp(tcp, "t") != 0);
data/tcsh-6.21.00/sh.c:764: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.
    if ((tcp = getenv("PATH")) == NULL)
data/tcsh-6.21.00/sh.c:789:13:  [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 ((tcp = getenv("SHELL")) != NULL) {
data/tcsh-6.21.00/sh.c:802: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.
    if ((tcp = getenv("PROGRAM_ENVIRONMENT")) == NULL)
data/tcsh-6.21.00/sh.c:808: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.
    if ((tcp = getenv("LS_COLORS")) != NULL)
data/tcsh-6.21.00/sh.c:810: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.
    if ((tcp = getenv("LSCOLORS")) != NULL)
data/tcsh-6.21.00/sh.c:820:13:  [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 ((tmp = getenv("TMP")) != NULL) {
data/tcsh-6.21.00/sh.c:834:23:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *tmpdir = getenv ("TMPDIR");
data/tcsh-6.21.00/sh.c:865:62:  [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 (((tcp = setlocale(LC_CTYPE, NULL)) != NULL || (tcp = getenv("LANG")) != NULL) && !adrof(CHECK_MBYTEVAR))
data/tcsh-6.21.00/sh.c:867: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.
    if ((tcp = getenv("LANG")) != NULL && !adrof(CHECK_MBYTEVAR))
data/tcsh-6.21.00/sh.c:879:46:  [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 (setlocale(LC_CTYPE, NULL) != NULL || getenv("LANG") != NULL)
data/tcsh-6.21.00/sh.c:881: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("LANG") != NULL)
data/tcsh-6.21.00/sh.dir.c:143:27:  [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 (swd_ok && (cwd = getenv("PWD")) != NULL) {
data/tcsh-6.21.00/sh.dol.c:576: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.
	dolp = (vp || getenv(short2str(name->s))) ? STR1 : STR0;
data/tcsh-6.21.00/sh.dol.c:581:17:  [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.
	np = str2short(getenv(short2str(name->s)));
data/tcsh-6.21.00/sh.func.c:1674:19:  [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.
		    AsciiOnly = getenv("LANG") == NULL &&
data/tcsh-6.21.00/sh.func.c:1675:4:  [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.
			getenv("LC_CTYPE") == NULL;
data/tcsh-6.21.00/sh.set.c:132:7:  [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.
	cp = getenv("TERMCAP");
data/tcsh-6.21.00/tc.func.c:527: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.
	if ((ep = getenv("EDITOR")) != NULL) {	/* if we have a value */
data/tcsh-6.21.00/tc.func.c:534: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.
	if ((vp = getenv("VISUAL")) != NULL) {	/* if we have a value */
data/tcsh-6.21.00/tc.func.c:762:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	    if ((afsname = getenv("AFSUSER")) == NULL)
data/tcsh-6.21.00/tc.func.c:1624: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.
    if ((cp = getenv("SHLVL")) != NULL) {
data/tcsh-6.21.00/tc.func.c:2103:32:  [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.
    termtype = (v[1] == NULL ? getenv("TERM") : short2str(v[1]));
data/tcsh-6.21.00/tc.os.c:79: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/tcsh-6.21.00/tc.os.c:125: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.
	char   *val = getenv(short2str(pathvars[i]));
data/tcsh-6.21.00/tc.os.h:470:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
extern char *getenv();
data/tcsh-6.21.00/tc.prompt.c:311: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.
		    cz = getenv("HOST");
data/tcsh-6.21.00/tc.prompt.c:329: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.
		    cz = getenv("HOST");
data/tcsh-6.21.00/tw.help.c:92:20:  [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.
	hpath = str2short(getenv(SEARCHLIST));
data/tcsh-6.21.00/vms.termcap.c:35:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
extern char	*getenv();	/* new, improved getenv */
data/tcsh-6.21.00/vms.termcap.c:80:13:  [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.
	termfile = getenv("TERMCAP");
data/tcsh-6.21.00/win32/dirent.c:293:10:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
		hmpr = LoadLibrary("MPR.DLL");
data/tcsh-6.21.00/win32/fork.c:117:41:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
	myNtCurrentTeb = (void*)GetProcAddress(LoadLibrary("ntdll.dll"),
data/tcsh-6.21.00/win32/fork.c:264:7:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
	rc = CreateProcess(NULL,
data/tcsh-6.21.00/win32/fork.c:264:7:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
	rc = CreateProcess(NULL,
data/tcsh-6.21.00/win32/msg/test.c:16:13:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
   	hinst = LoadLibrary(argv[1]);
data/tcsh-6.21.00/win32/nt.char.c:122:14:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
		hlangdll = LoadLibrary(ptr);
data/tcsh-6.21.00/win32/nt.who.c:69:13:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
		hnetapi = LoadLibrary("NETAPI32.DLL");
data/tcsh-6.21.00/win32/nt.who.c:79:2:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
	InitializeCriticalSection(&nb_critter);
data/tcsh-6.21.00/win32/nt.who.c:100:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
		EnterCriticalSection(&nb_critter);
data/tcsh-6.21.00/win32/ntfunc.c:255:8:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
	if (! CreateProcess(NULL,
data/tcsh-6.21.00/win32/ntfunc.c:255:8:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
	if (! CreateProcess(NULL,
data/tcsh-6.21.00/win32/ntfunc.c:491:7:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
	if (!CreateProcess(NULL,
data/tcsh-6.21.00/win32/ntfunc.c:491:7:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
	if (!CreateProcess(NULL,
data/tcsh-6.21.00/win32/ntfunc.c:588:15:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
		hShellDll = LoadLibrary("Shell32.dll");
data/tcsh-6.21.00/win32/signal.c:80:2:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
	InitializeCriticalSection(&sigcritter);
data/tcsh-6.21.00/win32/signal.c:191:2:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
	EnterCriticalSection(&sigcritter);
data/tcsh-6.21.00/win32/signal.c:343:9:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
        EnterCriticalSection(&sigcritter);
data/tcsh-6.21.00/win32/signal.c:380:2:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
	EnterCriticalSection(&sigcritter);
data/tcsh-6.21.00/win32/signal.c:485:2:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
	EnterCriticalSection(&sigcritter);
data/tcsh-6.21.00/win32/support.c:521:9:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
	hlib = LoadLibrary("kernel32.dll");
data/tcsh-6.21.00/dotlock.c:49: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 path[MAXPATHLEN], hostname[MAXHOSTNAMELEN + 1];
data/tcsh-6.21.00/dotlock.c:79: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).
		fd = open(path, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_SYNC, 0);
data/tcsh-6.21.00/dotlock.c:129: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 path[MAXPATHLEN];
data/tcsh-6.21.00/dotlock.c:175: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 path[MAXPATHLEN];
data/tcsh-6.21.00/ed.chared.c:666:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    (void) memcpy(op, buf, buf_len * sizeof(Char));
data/tcsh-6.21.00/ed.chared.c:3387: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 buf[MB_LEN_MAX];
data/tcsh-6.21.00/ed.init.c:56:21:  [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.
#define uc unsigned char
data/tcsh-6.21.00/ed.init.c:57: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 ttychars[NN_IO][C_NCC] = {
data/tcsh-6.21.00/ed.init.c:625: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.
        char    buf[BUFSIZE];
data/tcsh-6.21.00/ed.inputl.c:750: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 cbuf[MB_LEN_MAX];
data/tcsh-6.21.00/ed.screen.c:370: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(t->str, cap, size);
data/tcsh-6.21.00/ed.screen.c:499:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    tv->val = atoi(how);
data/tcsh-6.21.00/ed.screen.c:524:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char    buf[TC_BUFSIZE];
data/tcsh-6.21.00/ed.screen.c:665:13:  [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).
	arg_rows = atoi(short2str(*v));
data/tcsh-6.21.00/ed.screen.c:688:13:  [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).
	arg_cols = atoi(short2str(*v));
data/tcsh-6.21.00/ed.screen.c:696:13:  [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).
	arg_rows = atoi(short2str(*v));
data/tcsh-6.21.00/ed.screen.c:1394: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[TC_BUFSIZE];
data/tcsh-6.21.00/ed.screen.c:1395:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char bp[TC_BUFSIZE];
data/tcsh-6.21.00/ed.xmap.c:285:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    (void) memcpy(ptr->val.str.buf, val->str.buf, len);
data/tcsh-6.21.00/gethost.c:225:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[INBUFSIZE];
data/tcsh-6.21.00/gethost.c:228: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 defs[INBUFSIZE];
data/tcsh-6.21.00/gethost.c:229: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 stmt[INBUFSIZE];
data/tcsh-6.21.00/gethost.c:247:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(fname = argv[1], "r")) == NULL) {
data/tcsh-6.21.00/glob.c:142:5:  [2] (buffer) wchar_t:
  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.
    wchar_t s1[2], s2[2];
data/tcsh-6.21.00/glob.c:162: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 s1[2], s2[2];
data/tcsh-6.21.00/glob.c:546: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[MB_LEN_MAX], *p;
data/tcsh-6.21.00/ma.setp.c:101: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 *pdir[MAXDIRS];	/* directory names for each pathlist */
data/tcsh-6.21.00/ma.setp.c:185:15:  [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).
		incmd(cmd1, atoi(cmd+2));
data/tcsh-6.21.00/ma.setp.c:203:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		dncmd(atoi(cmd+2));
data/tcsh-6.21.00/ma.setp.c:216:15:  [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).
		cncmd(cmd1, atoi(cmd+2));
data/tcsh-6.21.00/ma.setp.c:349: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 newbuf[MAXPATHLEN+1];/*FIXBUF*/
data/tcsh-6.21.00/ma.setp.c:392: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 newbuf[MAXPATHLEN+1];/*FIXBUF*/
data/tcsh-6.21.00/ma.setp.c:456: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 newbuf[2000];/*FIXBUF*/
data/tcsh-6.21.00/ma.setp.c:558: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 newbuf[MAXPATHLEN+1];/*FIXBUF*/
data/tcsh-6.21.00/ma.setp.c:580: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 keybuf[MAXPATHLEN+1];/*FIXBUF*/
data/tcsh-6.21.00/sh.c:176: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 trypath[MAXPATHLEN];
data/tcsh-6.21.00/sh.c:681: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    cbuff[MAXHOSTNAMELEN];
data/tcsh-6.21.00/sh.char.c:906: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 _cmap_lower[256] = {
data/tcsh-6.21.00/sh.char.c:941: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 _cmap_upper[256] = {
data/tcsh-6.21.00/sh.dir.c:1387:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	num = (unsigned int) atoi(short2str(snum));
data/tcsh-6.21.00/sh.dol.c:425: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 cbuf[MB_LEN_MAX];
data/tcsh-6.21.00/sh.dol.c:957:9:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    if (mkstemp(tmp) == -1)
data/tcsh-6.21.00/sh.err.c:191: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 *elst[NO_ERRORS] INIT_ZERO_STRUCT;
data/tcsh-6.21.00/sh.err.c:203: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.
	xfree((char *)(intptr_t)elst[i]);
data/tcsh-6.21.00/sh.exec.c:125: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 xhash[HSHSIZ / BITS_PER_BYTE];
data/tcsh-6.21.00/sh.exec.c:361: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    pref[2];
data/tcsh-6.21.00/sh.exec.c:653:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        uhashlength = atoi(short2str(vv[1]));
data/tcsh-6.21.00/sh.exec.c:655: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).
	    uhashwidth = atoi(short2str(vv[2]));
data/tcsh-6.21.00/sh.exec.c:661:15:  [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).
		hashdebug = atoi(short2str(vv[3]));
data/tcsh-6.21.00/sh.exp.c:632: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 *string, string0[22 + MB_LEN_MAX + 1];	/* space for 64 bit octal */
data/tcsh-6.21.00/sh.exp.c:705:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    i = isatty(atoi(short2str(ep)));
data/tcsh-6.21.00/sh.file.c:246: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[MB_LEN_MAX];
data/tcsh-6.21.00/sh.file.c:688: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    tinputline[BUFSIZE + 1];/*FIXBUF*/
data/tcsh-6.21.00/sh.h:786: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 Bfclens[BUFSIZE + 1];
data/tcsh-6.21.00/sh.hist.c:1224: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 path[MAXPATHLEN];
data/tcsh-6.21.00/sh.init.c:232:16:  [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.
        xfree((char *)(intptr_t)mesg[i].pname);
data/tcsh-6.21.00/sh.lex.c:1558: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 cbuf[BUFSIZE + 1];
data/tcsh-6.21.00/sh.lex.c:1680:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(void) memcpy(fbuf[buf] + off, InputBuf + c - numleft,
data/tcsh-6.21.00/sh.misc.c:67: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(r, s, len);
data/tcsh-6.21.00/sh.misc.c:83: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(r, s, size);
data/tcsh-6.21.00/sh.misc.c:222: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(ep, cp, cl);
data/tcsh-6.21.00/sh.misc.c:223: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(ep + cl, dp, dl + 1);
data/tcsh-6.21.00/sh.misc.c:644:16:  [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).
	while ((res = open(path, oflag)) == -1 && errno == EINTR)
data/tcsh-6.21.00/sh.misc.c:657:16:  [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).
	while ((res = open(path, oflag, mode)) == -1 && errno == EINTR)
data/tcsh-6.21.00/sh.print.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    linbuf[2048];		/* was 128 */
data/tcsh-6.21.00/sh.print.c:124: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[MB_LEN_MAX];
data/tcsh-6.21.00/sh.print.c:135: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[MB_LEN_MAX];
data/tcsh-6.21.00/sh.proc.c:346:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    >= atoi(short2str(varval(STRtime))))
data/tcsh-6.21.00/sh.proc.c:1103: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.
			ptr = (char *)(intptr_t)mesg[pp->p_reason & 0177].pname;
data/tcsh-6.21.00/sh.proc.c:1683:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	int     idx = atoi(short2str(cp + 1));
data/tcsh-6.21.00/sh.sem.c:477: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.
		    pid = vfork();
data/tcsh-6.21.00/tc.func.c:414: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    *tv[2];
data/tcsh-6.21.00/tc.func.c:1092:36:  [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).
	    if ((logout_time = (unsigned) atoi(short2str(cp)) * 60) > 0) {
data/tcsh-6.21.00/tc.func.c:1109:34:  [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).
	    if ((lock_time = (unsigned) atoi(short2str(cp)) * 60) > 0) {
data/tcsh-6.21.00/tc.func.c:1629:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    val += atoi(cp);
data/tcsh-6.21.00/tc.func.c:1795: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 lbuf[HACKBUFSZ], *p, *ws;
data/tcsh-6.21.00/tc.func.c:1887:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char hbuf[NI_MAXHOST];
data/tcsh-6.21.00/tc.func.c:1946: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 dbuf[MAXHOSTNAMELEN];
data/tcsh-6.21.00/tc.func.c:2049: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[BUFSIZE];
data/tcsh-6.21.00/tc.func.c:2099: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 termcap_buffer[2048];
data/tcsh-6.21.00/tc.nls.c:40:3:  [2] (buffer) wchar_t:
  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.
  wchar_t ws[2];
data/tcsh-6.21.00/tc.os.c:196: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    xvers[MAXPATHLEN];
data/tcsh-6.21.00/tc.os.c:346:13:  [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).
	    p[i] = atoi(s);
data/tcsh-6.21.00/tc.os.c:474:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		pid = atoi(short2str(cp));
data/tcsh-6.21.00/tc.os.c:587:13:  [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).
	    warp = atoi(newwarp);
data/tcsh-6.21.00/tc.os.c:626: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    ubuf[100];
data/tcsh-6.21.00/tc.os.c:766: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    tibuf[BUFSIZE];
data/tcsh-6.21.00/tc.os.c:871: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    ubuf[100];
data/tcsh-6.21.00/tc.os.c:896: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    ubuf[100];
data/tcsh-6.21.00/tc.os.c:1218: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 pathbuf[MAXPATHLEN];	/* temporary pathname buffer */
data/tcsh-6.21.00/tc.os.c:1304: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    pathbuf[MAXPATHLEN], nextpathbuf[MAXPATHLEN * 2];
data/tcsh-6.21.00/tc.os.h:471:12:  [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).
extern int atoi();
data/tcsh-6.21.00/tc.os.h:570:13:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
extern void bcopy	(const void *, void *, size_t);
data/tcsh-6.21.00/tc.os.h:571:29:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define memmove(a, b, c) (bcopy((char *) (b), (char *) (a), (int) (c)), a)
data/tcsh-6.21.00/tc.os.h:603:14:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
extern pid_t vfork (void);
data/tcsh-6.21.00/tc.os.h:611:30:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define va_copy(DEST, SRC) memcpy(&(DEST), &(SRC), sizeof(va_list))
data/tcsh-6.21.00/tc.printf.c:63: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[(CHAR_BIT * sizeof (l) + 2) / 3 + 1]; /* Octal: 3 bits per char */
data/tcsh-6.21.00/tc.printf.c:97:13:  [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).
		f_width = atoi(f);
data/tcsh-6.21.00/tc.printf.c:109:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		    prec = atoi(f);
data/tcsh-6.21.00/tc.printf.c:282: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 cbuf[MB_LEN_MAX];
data/tcsh-6.21.00/tc.prompt.c:47: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   *month_list[12];
data/tcsh-6.21.00/tc.prompt.c:48: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   *day_list[7];
data/tcsh-6.21.00/tc.sched.c:72: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 kludge[10];
data/tcsh-6.21.00/tc.sched.c:105:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	count = atoi(short2str(++cp));
data/tcsh-6.21.00/tc.sched.c:136:13:  [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).
    hours = atoi(short2str(cp));
data/tcsh-6.21.00/tc.sched.c:140:12:  [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).
	minutes = atoi(short2str(++cp));
data/tcsh-6.21.00/tc.str.c:90:6:  [2] (buffer) wchar_t:
  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.
	    wchar_t ws[3];
data/tcsh-6.21.00/tc.str.c:113: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 back[MB_LEN_MAX];
data/tcsh-6.21.00/tc.str.c:444: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(n, s, len * sizeof (*n));
data/tcsh-6.21.00/tc.str.c:459: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(n, s, size);
data/tcsh-6.21.00/tc.str.c:525: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(buf, s, size);
data/tcsh-6.21.00/tc.str.c:674: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(buf->s + buf->len, s, len * sizeof(*buf->s));	\
data/tcsh-6.21.00/tc.who.c:140: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    who_name[UTNAMLEN + 1];
data/tcsh-6.21.00/tc.who.c:141: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    who_new[UTNAMLEN + 1];
data/tcsh-6.21.00/tc.who.c:142: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    who_tty[UTLINLEN + 1];
data/tcsh-6.21.00/tc.who.c:144: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    who_host[UTHOSTLEN + 1];
data/tcsh-6.21.00/tw.help.c:130:19:  [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 buf[512];
data/tcsh-6.21.00/vms.termcap.c:36:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#ifndef fopen
data/tcsh-6.21.00/vms.termcap.c:37: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).
extern FILE	*fopen();	/* old fopen */
data/tcsh-6.21.00/vms.termcap.c:51: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(bp,
data/tcsh-6.21.00/vms.termcap.c:83:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(termfile, "r")) == (FILE *) NULL) {
data/tcsh-6.21.00/vms.termcap.c:287: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	ret[24];
data/tcsh-6.21.00/win32/bogus.c:39: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 username[20];
data/tcsh-6.21.00/win32/bogus.c: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.
static char homedir[MAX_PATH + 1];/*FIXBUF*/
data/tcsh-6.21.00/win32/bogus.c:43: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 dummy[2]={0,0};
data/tcsh-6.21.00/win32/console.c:174: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 errbuf[128];/*FIXME: uninitialized*/
data/tcsh-6.21.00/win32/console.c:517:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cp[3];
data/tcsh-6.21.00/win32/console.c:582: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).
		int n = atoi(t);
data/tcsh-6.21.00/win32/dirent.c:146: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(dptr->orig_dir_name,tmp,lstrlen(tmp));
data/tcsh-6.21.00/win32/dirent.c:161: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((dptr->dd_buf)->d_name,".",2);
data/tcsh-6.21.00/win32/dirent.c:165: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((dptr->dd_buf)->d_name,fdata.cFileName,MAX_PATH);
data/tcsh-6.21.00/win32/dirent.c:213: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((dptr->dd_buf)->d_name,fdata.cFileName,MAX_PATH);
data/tcsh-6.21.00/win32/dirent.c:239: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((dir->dd_buf)->d_name,fdata.cFileName,MAX_PATH);
data/tcsh-6.21.00/win32/dirent.c:251: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((dir->dd_buf)->d_name,fdata.cFileName,MAX_PATH);
data/tcsh-6.21.00/win32/dirent.c:367: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( (dir->dd_buf)->d_name, p1, lstrlen(p1)+1);
data/tcsh-6.21.00/win32/dirent.h:55: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            d_name[NAME_MAX+1];
data/tcsh-6.21.00/win32/dirent.h:63: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 orig_dir_name[NAME_MAX +1];
data/tcsh-6.21.00/win32/fork.c:181: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 modname[512];/*FIXBUF*/
data/tcsh-6.21.00/win32/fork.c:465: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[1000];
data/tcsh-6.21.00/win32/fork.c:570: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 parentname[256],childname[256];
data/tcsh-6.21.00/win32/globals.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 putbuf[2048];
data/tcsh-6.21.00/win32/io.c:156:21:  [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 color_buf[256];
data/tcsh-6.21.00/win32/msg/test.c:10: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 winbuf[128],oembuf[128];
data/tcsh-6.21.00/win32/msg/test.c:18: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).
	number = atoi(argv[2]);
data/tcsh-6.21.00/win32/nt.bind.c:1302:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	fkey = (short)atoi(astr);
data/tcsh-6.21.00/win32/nt.char.c:48: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 ch1[2],ch2[2];
data/tcsh-6.21.00/win32/nt.char.c:65: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 oembuf[256];/*FIXBUF*/
data/tcsh-6.21.00/win32/nt.screen.c:129:8:  [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).
		li = atoi(how);
data/tcsh-6.21.00/win32/nt.screen.c:132:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		win = atoi(how);
data/tcsh-6.21.00/win32/nt.screen.c:149: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    cv[BUFSIZE];/*FIXBUF*/
data/tcsh-6.21.00/win32/nt.who.c:259: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(Ncb->ncb_callname,nb_name,lstrlen(nb_name));
data/tcsh-6.21.00/win32/ntfunc.c:149: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 argv0[256];/*FIXBUF*/
data/tcsh-6.21.00/win32/ntfunc.c:275: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 erbuf[MAX_PATH];
data/tcsh-6.21.00/win32/ntfunc.c:381: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 titlebuf[512];
data/tcsh-6.21.00/win32/ntfunc.c:382: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 errbuf[128],err2[128];
data/tcsh-6.21.00/win32/ntfunc.c:430: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 cmdbuf[128];
data/tcsh-6.21.00/win32/ntfunc.c:514: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 *hb_subst_array[20] ;
data/tcsh-6.21.00/win32/ntfunc.c:518: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 envbuf[1024];
data/tcsh-6.21.00/win32/ntfunc.c:577: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 no_assoc[256]; //the environment string/*FIXBUF*/
data/tcsh-6.21.00/win32/ntfunc.c:578: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 *no_assoc_array[20]; // the list of extensions to NOT try /*FIXBUF*/
data/tcsh-6.21.00/win32/ntfunc.c:658: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 err2[256];
data/tcsh-6.21.00/win32/ntfunc.c:1044: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 guivar[50];
data/tcsh-6.21.00/win32/ntfunc.c:1078: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[2];
data/tcsh-6.21.00/win32/ntfunc.c:1127: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 extension[MAXPATHLEN]; 
data/tcsh-6.21.00/win32/ntfunc.c:1172: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 windir[MAX_PATH];
data/tcsh-6.21.00/win32/ntfunc.c:1183: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 name_only[MAX_PATH];
data/tcsh-6.21.00/win32/ntfunc.c:1185: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 uptmp[5], *nameptr, *np2;
data/tcsh-6.21.00/win32/ntport.h:117: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).
#define open                  nt_open
data/tcsh-6.21.00/win32/ntport.h:143:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#define fopen                 nt_fopen
data/tcsh-6.21.00/win32/ntport.h:499: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 ut_line[UT_LINESIZE]; /* device pref'/dev/' */
data/tcsh-6.21.00/win32/ntport.h:500: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 ut_id[2]; /*abbrev tty name */
data/tcsh-6.21.00/win32/ntport.h:502: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 ut_user[UT_NAMESIZE]; /* user name */
data/tcsh-6.21.00/win32/ntport.h:503: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 ut_host[UT_HOSTSIZE]; /* hostname for rlogin */
data/tcsh-6.21.00/win32/stdio.c:191: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[512];/*FIXBUF*/
data/tcsh-6.21.00/win32/support.c:80:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char temp[512];/*FIXBUF*/
data/tcsh-6.21.00/win32/support.c:141: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 defcwd[MAX_PATH];
data/tcsh-6.21.00/win32/support.c:170:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char temp[256];
data/tcsh-6.21.00/win32/support.c:426: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 guivar[50];
data/tcsh-6.21.00/win32/support.c:554:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char temp[MAX_PATH+5];
data/tcsh-6.21.00/win32/support.c:555: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[MAX_PATH];
data/tcsh-6.21.00/win32/support.c:556: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 ptr1[MAX_PATH];
data/tcsh-6.21.00/win32/support.c:557: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 ptr2[MAX_PATH];
data/tcsh-6.21.00/win32/support.c:558: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 ptr3[MAX_PATH];
data/tcsh-6.21.00/win32/support.c:913: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(pathstr,oldpath,len);
data/tcsh-6.21.00/dotlock.c:165:10:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
			(void)usleep((unsigned int)pollinterval * 1000);
data/tcsh-6.21.00/ed.inputl.c:44:13:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
static Char mismatch[] = { '\\', '-', '%', '\0' };
data/tcsh-6.21.00/ed.inputl.c:47:11:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			Strchr(mismatch, (c)))
data/tcsh-6.21.00/ed.screen.c:368: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).
	size = strlen(cap) + 1;
data/tcsh-6.21.00/ed.term.c:631: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).
		st = len = strlen(ttylist[z][m->m_type].t_name);
data/tcsh-6.21.00/ed.term.c:639: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).
		cu = strlen(m->m_name) + (x != '\0') + 1;
data/tcsh-6.21.00/gethost.c:150: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(b) + 1;
data/tcsh-6.21.00/gethost.c:152: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).
	    l = strlen(a) + len;
data/tcsh-6.21.00/glob.c:322: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).
    patbuf = xmalloc((strlen(pattern) + 1) * sizeof(*patbuf));
data/tcsh-6.21.00/glob.c:437: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).
	    copy = xmalloc(strlen(pattern) + 1);
data/tcsh-6.21.00/ma.setp.c:290:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(pe->pname) + 1;
data/tcsh-6.21.00/ma.setp.c:294: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).
	    len += strlen(pe->pdir[i]) + 1;
data/tcsh-6.21.00/sh.c:188: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).
        len = strlen(old) + 1;	/* don't forget the colon. */
data/tcsh-6.21.00/sh.c:192: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).
    len += 2 * strlen(path) +
data/tcsh-6.21.00/sh.c:198: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).
	size_t pathlen = strlen(path);
data/tcsh-6.21.00/sh.c:202: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).
	new_p += strlen(new_p);
data/tcsh-6.21.00/sh.c:790: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).
	    sh_len = strlen(tcp);
data/tcsh-6.21.00/sh.dol.c:1042: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).
		    (void) xwrite(0, tmp, strlen (tmp));
data/tcsh-6.21.00/sh.dol.c:1101: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).
		    (void) xwrite(0, tmp, strlen (tmp));
data/tcsh-6.21.00/sh.dol.c:1108: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).
		(void) xwrite(0, tmp, strlen (tmp));
data/tcsh-6.21.00/sh.dol.c:1117: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).
    (void) xwrite(0, tmp, strlen (tmp));
data/tcsh-6.21.00/sh.exec.c:731: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).
		ssize_t	ext = strlen(dp->d_name) - 4;
data/tcsh-6.21.00/sh.func.c:1802:11:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	i = (int)umask(0);
data/tcsh-6.21.00/sh.func.c:1803:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	(void) umask(i);
data/tcsh-6.21.00/sh.func.c:1812:12:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    (void) umask(i);
data/tcsh-6.21.00/sh.func.c:1823:22:  [1] (obsolete) ulimit:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name, which is NOT obsolete) (CWE-676). Use getrlimit(2),
  setrlimit(2), and sysconf(3) instead.
    extern RLIM_TYPE ulimit();
data/tcsh-6.21.00/sh.func.c:2240:13:  [1] (obsolete) ulimit:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name, which is NOT obsolete) (CWE-676). Use getrlimit(2),
  setrlimit(2), and sysconf(3) instead.
    limit = ulimit(lp->limconst, 0);
data/tcsh-6.21.00/sh.func.c:2353:9:  [1] (obsolete) ulimit:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name, which is NOT obsolete) (CWE-676). Use getrlimit(2),
  setrlimit(2), and sysconf(3) instead.
    if (ulimit(toset(lp->limconst), limit) < 0) {
data/tcsh-6.21.00/sh.func.c:2571: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).
	maxwidth = max(maxwidth, strlen(b->bname));
data/tcsh-6.21.00/sh.func.c:2582: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).
		w = strlen(b->bname);
data/tcsh-6.21.00/sh.func.c:2638: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).
    src_size = strlen(src) + 1;
data/tcsh-6.21.00/sh.h:1100:27:  [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.
#define Strncat(a, b, c) 	strncat(a, b, c)
data/tcsh-6.21.00/sh.h:1102:27:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
#define Strncpy(a, b, c) 	strncpy(a, b, c)
data/tcsh-6.21.00/sh.h:1103:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define Strlen(a)		strlen(a)
data/tcsh-6.21.00/sh.h:1123:27:  [1] (buffer) wcsncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or
  automatically resizing strings.
#define Strncat(a, b, c) 	wcsncat(a, b, c)
data/tcsh-6.21.00/sh.h:1125:26:  [1] (buffer) wcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
#define Strncpy(a, b, c)	wcsncpy(a, b, c)
data/tcsh-6.21.00/sh.h:1126:20:  [1] (buffer) wcslen:
  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).
#define Strlen(a)		wcslen(a)
data/tcsh-6.21.00/sh.misc.c:81: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).
    size = strlen(s) + 1;
data/tcsh-6.21.00/sh.misc.c:219: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).
    cl = strlen(cp);
data/tcsh-6.21.00/sh.misc.c:220: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).
    dl = strlen(dp);
data/tcsh-6.21.00/sh.misc.c:674:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((res = read(fildes, buf, nbyte)) == -1 && errno == EINTR);
data/tcsh-6.21.00/sh.proc.c:1448: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).
		    len += strlen(name) + 1;
data/tcsh-6.21.00/sh.proc.c:1451: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(name) + 1;
data/tcsh-6.21.00/tc.alloc.c:69: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).
    TCSH_IGNORE(write(didfds ? 2 : SHDIAG, msg, strlen(msg)));
data/tcsh-6.21.00/tc.func.c:781: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).
	    (void) memset(pp, 0, strlen(pp));
data/tcsh-6.21.00/tc.func.c:1953: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).
		    if (strlen(name) < utmphostsize())
data/tcsh-6.21.00/tc.func.c:1966: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).
				cbuf = strspl(name, ptr + strlen(s));
data/tcsh-6.21.00/tc.func.c:1976:8:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			    strncpy(hbuf, res->ai_canonname, sizeof(hbuf));
data/tcsh-6.21.00/tc.func.c:2004: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).
	left = strlen(host);
data/tcsh-6.21.00/tc.os.c:130:45:  [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).
	spaths[i] = xmalloc((Strlen(pathvars[i]) + strlen(val) + 2) *
data/tcsh-6.21.00/tc.os.c:133:9:  [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.
	(void) strcat(spaths[i], "=");
data/tcsh-6.21.00/tc.os.c:404: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).
	if (setlocal(st->sf_local, strlen(st->sf_local)) == -1) {
data/tcsh-6.21.00/tc.os.c:668: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).
    for (white = str + strlen(str) - 1; isspace(*white) && white > str; --white)
data/tcsh-6.21.00/tc.os.c:739: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 (strlen(str_beg) != 0)
data/tcsh-6.21.00/tc.os.c:1160: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).
    i = strlen(uts.nodename) + 1;
data/tcsh-6.21.00/tc.os.c:1161:12:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    (void) strncpy(name, uts.nodename, i < namlen ? i : namlen);
data/tcsh-6.21.00/tc.os.c:1167:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	(void) strncpy(name, "OS/2", namlen);
data/tcsh-6.21.00/tc.os.c:1169:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	(void) strncpy(name, "minix", namlen);
data/tcsh-6.21.00/tc.os.c:1274:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant character.
	(void) strncpy(pathname, "/", pathlen);
data/tcsh-6.21.00/tc.os.c:1276:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(pathname, pnptr, pathlen);
data/tcsh-6.21.00/tc.os.c:1335:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    (void) strncpy(pathname, *pathptr != '/' ? "/" : pathptr, pathlen);
data/tcsh-6.21.00/tc.os.c:1375:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void)strncpy(cur_name_add, d->d_name,
data/tcsh-6.21.00/tc.os.c:1419: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 len = strlen(str);
data/tcsh-6.21.00/tc.os.c:1542: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).
    namelen = strlen(name);
data/tcsh-6.21.00/tc.printf.c:311: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).
		f_width = f_width - strlen(bp);
data/tcsh-6.21.00/tc.str.c:520: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).
    size = strlen(s) + 1;
data/tcsh-6.21.00/tc.str.c:709: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).
DO_STRBUF(strbuf, char, strlen);
data/tcsh-6.21.00/tc.who.c:334:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void) strncpy(wp->who_new, utmp.ut_name, UTNAMLEN);
data/tcsh-6.21.00/tc.who.c:339:14:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		    (void) strncpy(wp->who_host, host, UTHOSTLEN);
data/tcsh-6.21.00/tc.who.c:343:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void) strncpy(wp->who_host, utmp.ut_host, UTHOSTLEN);
data/tcsh-6.21.00/tc.who.c:355:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    (void) strncpy(wpnew->who_tty, utmp.ut_line, UTLINLEN);
data/tcsh-6.21.00/tc.who.c:360:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void) strncpy(wpnew->who_host, host, UTHOSTLEN);
data/tcsh-6.21.00/tc.who.c:364:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    (void) strncpy(wpnew->who_host, utmp.ut_host, UTHOSTLEN);
data/tcsh-6.21.00/tc.who.c:376:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void) strncpy(wpnew->who_new, utmp.ut_name, UTNAMLEN);
data/tcsh-6.21.00/tc.who.c:556: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).
	    wbuf = xmalloc(strlen(pb) + 1);
data/tcsh-6.21.00/tc.who.c:576: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).
	    wbuf = xmalloc(strlen(pb) + 1);
data/tcsh-6.21.00/tw.init.c:235: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(dp->d_name);
data/tcsh-6.21.00/vms.termcap.c:74: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).
	size_t	len = strlen(name);
data/tcsh-6.21.00/vms.termcap.c:97: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).
		while (*(cp = &bp[strlen(bp) - 2]) == '\\')
data/tcsh-6.21.00/vms.termcap.c:349:2:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	usleep(delay*100); /* strictly spoken, it should be *1000 */
data/tcsh-6.21.00/win32/ntport.h:118:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define read(f,b,n)           nt_read((f),(b),(n))
data/tcsh-6.21.00/win32/ntport.h:127:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define fgetc(a)              nt_fgetc(a)
data/tcsh-6.21.00/win32/stdio.c:422: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).
	    size_t len = strlen(filename);

ANALYSIS SUMMARY:

Hits = 390
Lines analyzed = 69165 in approximately 1.60 seconds (43285 lines/second)
Physical Source Lines of Code (SLOC) = 52141
Hits@level = [0]  48 [1]  83 [2] 184 [3]  72 [4]  49 [5]   2
Hits@level+ = [0+] 438 [1+] 390 [2+] 307 [3+] 123 [4+]  51 [5+]   2
Hits/KSLOC@level+ = [0+] 8.4003 [1+] 7.47972 [2+] 5.88788 [3+] 2.35899 [4+] 0.978117 [5+] 0.0383575
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.