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/scm-5f2/scm.h
Examining data/scm-5f2/dynl.c
Examining data/scm-5f2/setjump.h
Examining data/scm-5f2/macosx-config.h
Examining data/scm-5f2/unix.c
Examining data/scm-5f2/continue.h
Examining data/scm-5f2/byte.c
Examining data/scm-5f2/pre-crt0.c
Examining data/scm-5f2/get-contoffset-ia64.c
Examining data/scm-5f2/xevent.h
Examining data/scm-5f2/x.h
Examining data/scm-5f2/crs.c
Examining data/scm-5f2/unexsgi.c
Examining data/scm-5f2/ioext.c
Examining data/scm-5f2/ramap.c
Examining data/scm-5f2/pi.c
Examining data/scm-5f2/script.c
Examining data/scm-5f2/posix.c
Examining data/scm-5f2/differ.c
Examining data/scm-5f2/eval.c
Examining data/scm-5f2/patchlvl.h
Examining data/scm-5f2/rope.c
Examining data/scm-5f2/edline.c
Examining data/scm-5f2/continue.c
Examining data/scm-5f2/sc2.c
Examining data/scm-5f2/lastfile.c
Examining data/scm-5f2/gsubr.c
Examining data/scm-5f2/unexmacosx.c
Examining data/scm-5f2/x.c
Examining data/scm-5f2/scm.c
Examining data/scm-5f2/socket.c
Examining data/scm-5f2/unexec.c
Examining data/scm-5f2/bytenumb.c
Examining data/scm-5f2/unif.c
Examining data/scm-5f2/unexalpha.c
Examining data/scm-5f2/scmmain.c
Examining data/scm-5f2/ecrt0.c
Examining data/scm-5f2/rgx.c
Examining data/scm-5f2/gmalloc.c
Examining data/scm-5f2/debug.c
Examining data/scm-5f2/unexsunos4.c
Examining data/scm-5f2/unexelf.c
Examining data/scm-5f2/unexhp9k800.c
Examining data/scm-5f2/subr.c
Examining data/scm-5f2/record.c
Examining data/scm-5f2/sys.c
Examining data/scm-5f2/scmhob.h
Examining data/scm-5f2/repl.c
Examining data/scm-5f2/time.c
Examining data/scm-5f2/scmfig.h
Examining data/scm-5f2/findexec.c
Examining data/scm-5f2/scl.c

FINAL RESULTS:

data/scm-5f2/ioext.c:509:17:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
  SYSCALL(val = chmod(CHARS(pathname), INUM(mode)););
data/scm-5f2/posix.c:56:17:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
  SYSCALL(val = chown(CHARS(path), INUM(owner), INUM(group)););
data/scm-5f2/unexalpha.c:486:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
  if (chmod (name, sbuf.st_mode) < 0)
data/scm-5f2/unexec.c:1154:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
  if (chmod (name, sbuf.st_mode) == -1)
data/scm-5f2/unexelf.c:1283:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
  if (chmod (new_name, stat_buf.st_mode) == -1)
data/scm-5f2/unexsgi.c:885:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
  if (chmod (new_name, stat_buf.st_mode) == -1)
data/scm-5f2/unix.c:41:6:  [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.
	int readlink P((const char *path, char *buf, sizet bufsiz));
data/scm-5f2/unix.c:115:15:  [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.
  SYSCALL(i = readlink(CHARS(path), buf, (sizet)sizeof(buf)););
data/scm-5f2/dynl.c:531:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy((char *)libName,  CHARS(fname));
data/scm-5f2/dynl.c:560:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy((char *)symName, CHARS(symb));
data/scm-5f2/dynl.c:591:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy((char *)symName, CHARS(symb));
data/scm-5f2/findexec.c:143:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(p, s);
data/scm-5f2/findexec.c:164: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, X_OK) ? 0 : copy_of(name);
data/scm-5f2/findexec.c:170:7:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
      strcat(tbuf, name + 1);
data/scm-5f2/findexec.c:173:7:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
      strcat(tbuf, name);
data/scm-5f2/findexec.c:188:7:  [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(tbuf, (char *)getenv("HOME"));
data/scm-5f2/findexec.c:202:7:  [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(tbuf, (char *)getenv("HOME"));
data/scm-5f2/findexec.c:205:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(tbuf, name);
data/scm-5f2/findexec.c:207: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(tbuf, X_OK) == 0) {
data/scm-5f2/ioext.c:81:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	int access P((const char *name, int type));
data/scm-5f2/ioext.c:86:6:  [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.
	int execv P((const char *, char *const *));
data/scm-5f2/ioext.c:87:6:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	int execvp P((const char *, char *const *));
data/scm-5f2/ioext.c:104:6:  [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.
	int execv P((const char *, char *const *));
data/scm-5f2/ioext.c:105:6:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	int execvp P((const char *, char *const *));
data/scm-5f2/ioext.c:347:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(CHARS(fspec), CHARS(dirname));
data/scm-5f2/ioext.c:650:17:  [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.
  SYSCALL(val = access(CHARS(pathname), imodes););
data/scm-5f2/ioext.c:739:25:  [4] (shell) execvp:
  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.
  (strchr(modes, 'p') ? execvp : execv)(execargv[0], &execargv[1]);
data/scm-5f2/ioext.c:739:34:  [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.
  (strchr(modes, 'p') ? execvp : execv)(execargv[0], &execargv[1]);
data/scm-5f2/posix.c:31:8:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	FILE *popen P((const char* command, const char* type));
data/scm-5f2/posix.c:110:19:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	SCM_OPENCALL(f = popen(CHARS(pipestr), CHARS(modes)));
data/scm-5f2/rgx.c:420:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(pattern+1, CHARS(RGX_PATTERN(prog)));
data/scm-5f2/scl.c:92: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(&a[ch], str_nan0);
data/scm-5f2/scl.c:95:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(&a[ch], str_inf0);
data/scm-5f2/scl.c:105:16:  [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).
  if (f==0.0) {strcpy(a, str_0); return sizeof(str_0)-1;}
data/scm-5f2/scm.c:44:6:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	int system P((const char *));
data/scm-5f2/scm.c:806: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(buf+3, d2.name);
data/scm-5f2/scm.c:886:5:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
int system(command)
data/scm-5f2/scm.c:900:16:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  } else sts = execl("/bin/rc", "/bin/rc", "-c", command, nil);
data/scm-5f2/scm.c:915:20:  [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.
  cmd = MAKINUM(0L+system(CHARS(cmd)));
data/scm-5f2/script.c:119:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  if (access(name, X_OK)) return 0L;
data/scm-5f2/sys.c:51:8:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
	char *mktemp P((char *template));
data/scm-5f2/sys.c:309:23:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
  SYSCALL(temppos = !*mktemp(CHARS(name)););
data/scm-5f2/unexalpha.c:499: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, s, arg);
data/scm-5f2/unexec.c:357: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, msg, a1, a2);
data/scm-5f2/unexec.c:972:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (command, "nm %s | fgrep mcount", _execname);
data/scm-5f2/unexec.c:974:19:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if ( (pfile = popen(command, "r")) == NULL)
data/scm-5f2/unexec.c:987:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf (errbuf, "Failed to execute the command '%s'\n", command);
data/scm-5f2/unexelf.c:406:24:  [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 fatal(a, b, c) fprintf (stderr, a, b, c), exit (1)
data/scm-5f2/unexmacosx.c:278:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf (stderr, format, ap);
data/scm-5f2/unexsgi.c:427:24:  [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 fatal(a, b, c) fprintf(stderr, a, b, c), exit(1)
data/scm-5f2/unexsunos4.c:326:7:  [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 (p, progname);
data/scm-5f2/dynl.c:669: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.
  hshl = LoadLibrary(CHARS(fname));
data/scm-5f2/findexec.c:76:20:  [3] (buffer) getwd:
  This does not protect against buffer overflows by itself, so use with
  caution (CWE-120, CWE-20). Use getcwd instead.
#    define getcwd getwd
data/scm-5f2/findexec.c:178: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 (((search = (char *) getenv("DLDPATH")) == 0) &&
data/scm-5f2/findexec.c:179: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.
      ((search = (char *) getenv("PATH")) == 0))
data/scm-5f2/findexec.c:187:35:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (p[0]=='~' && p[1]=='/' && getenv("HOME")) {
data/scm-5f2/findexec.c:188:28:  [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.
      strcpy(tbuf, (char *)getenv("HOME"));
data/scm-5f2/findexec.c:201:44:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    else if (tbuf[0]=='~' && tbuf[1]==0 && getenv("HOME"))
data/scm-5f2/findexec.c:202:28:  [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.
      strcpy(tbuf, (char *)getenv("HOME"));
data/scm-5f2/ioext.c:496: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.
  SYSCALL(ans = getenv("PATH"););
data/scm-5f2/macosx-config.h:1051: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/scm-5f2/scm.c:43: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.
	char *getenv P((const char *name));
data/scm-5f2/scm.c:925: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.
char *getenv();
data/scm-5f2/scm.c:943: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.
  val = getenv(CHARS(nam));
data/scm-5f2/scm.h:42:17:  [3] (buffer) getwd:
  This does not protect against buffer overflows by itself, so use with
  caution (CWE-120, CWE-20). Use getcwd instead.
# define getcwd getwd
data/scm-5f2/scmmain.c:55:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  char *getenvpath = getenv(INIT_GETENV);
data/scm-5f2/sys.c:37:8:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
	char *tmpnam P((char *s));
data/scm-5f2/sys.c:267:17:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
  SYSCALL(ret = tmpnam(name););
data/scm-5f2/unexsunos4.c:94: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/scm-5f2/unexsunos4.c:312:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  path = getenv ("PATH");
data/scm-5f2/bytenumb.c:90:43:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    (0xFF ^ ((id + j >= 0) ? (((unsigned char *)byts)[id + j]) : 255));
data/scm-5f2/bytenumb.c:104:35:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    ((id + j >= 0) ? (((unsigned char *)byts)[id + j]) : 0);
data/scm-5f2/bytenumb.c:158: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 *)byts)[id--] = dg;
data/scm-5f2/bytenumb.c:169: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 *)byts)[id--] = 0xFF & dig;
data/scm-5f2/findexec.c:161: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 tbuf[MAXPATHLEN];
data/scm-5f2/get-contoffset-ia64.c:58:17:  [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).
  case 2: prt = fopen(argv[1], "w"); break;
data/scm-5f2/gmalloc.c:58:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#ifndef memcpy
data/scm-5f2/gmalloc.c:59:9:  [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	memcpy(d, s, n)		bcopy ((s), (d), (n))
data/scm-5f2/gmalloc.c:59:26:  [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	memcpy(d, s, n)		bcopy ((s), (d), (n))
data/scm-5f2/gmalloc.c:590:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (newinfo, _heapinfo, heapsize * sizeof (malloc_info));
data/scm-5f2/gmalloc.c:1211:5:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    bcopy (from, to, size);
data/scm-5f2/gmalloc.c:1241:8:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      bcopy (endf, endt, to - from);
data/scm-5f2/gmalloc.c:1247:4:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  bcopy (from, to, endt - from);
data/scm-5f2/gmalloc.c:1301:8:  [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 (result, ptr, size);
data/scm-5f2/gmalloc.c:1376:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy (result, ptr, min (size, (__malloc_size_t) 1 << type));
data/scm-5f2/ioext.c:181: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 cmodes[4];
data/scm-5f2/ioext.c:212: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 cmodes[4];
data/scm-5f2/ioext.c:492: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 wd[256];
data/scm-5f2/ioext.c:579:17:  [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).
    FILE* fin = fopen(CHARS(oldname), "rb");
data/scm-5f2/ioext.c:581: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 buff[1024];
data/scm-5f2/ioext.c:584: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).
    fout = fopen(CHARS(newname), "wb");
data/scm-5f2/ioext.c:826: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 cmodes[4];
data/scm-5f2/ioext.c:849:21:  [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).
  SCM_OPENCALL(fd = open(CHARS(fname), fdflags, cperms));
data/scm-5f2/lastfile.c:45: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 my_endbss[1];
data/scm-5f2/lastfile.c:50: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 _my_endbss[1];
data/scm-5f2/macosx-config.h:1159:9:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define bcopy(a,b,s) memcpy (b,a,s)
data/scm-5f2/macosx-config.h:1159:22:  [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 bcopy(a,b,s) memcpy (b,a,s)
data/scm-5f2/pi.c:38: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).
  if(c>1)n=atoi(v[1]);
data/scm-5f2/pi.c:39: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).
  if(c>2)d=atoi(v[2]);
data/scm-5f2/repl.c:64: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 upcase[CHAR_CODE_LIMIT];
data/scm-5f2/repl.c:65: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 downcase[CHAR_CODE_LIMIT];
data/scm-5f2/repl.c:152: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 num_buf[INTBUFLEN];
data/scm-5f2/repl.c:1829: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 num_buf[INTBUFLEN];
data/scm-5f2/rgx.c:180:32:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  for (i=sizeof(regex_t);i--;((char *)prog)[i] = 0);
data/scm-5f2/rgx.c:185:34:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    for (i=sizeof(regex_t);i--;((char *)prog2)[i] = 0);
data/scm-5f2/rgx.c:259:5:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    bcopy(CHARS(pattern), tmppat, LENGTH(pattern));
data/scm-5f2/rgx.c:403:7:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      bcopy(CHARS(str)+start, search_string, size-start);
data/scm-5f2/rgx.c:678:5:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    bcopy(edit->string + edit->start, ptr, edit->end - edit->start);
data/scm-5f2/rope.c:325:37:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  case tc7_VfixZ8: ptr = (void*)&(((char *)CDR(v))[pos]);
data/scm-5f2/rope.c:370:37:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  case tc7_VfixZ8: ptr = (void*)&(((char *)CDR(v))[pos]);
data/scm-5f2/scl.c:459: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 num_buf[FLOBUFLEN];
data/scm-5f2/scl.c:483: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 num_buf[INTBUFLEN];
data/scm-5f2/scl.c:496: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 num_buf[FLOBUFLEN];
data/scm-5f2/scm.c:124:17:  [2] (obsolete) ssignal:
  These functions are considered obsolete on most systems, and very
  non-portable (Linux-based systems handle them radically different,
  basically if gsignal/ssignal were the same as raise/signal respectively,
  while System V considers them a separate set and obsolete) (CWE-676).
  Switch to raise/signal, or some other signalling approach.
# define signal ssignal		/* Needed for TURBOC V1.0 */
data/scm-5f2/scm.c:412: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 ibuf[12];
data/scm-5f2/scm.c:413: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 pidbuf[32];
data/scm-5f2/scm.c:419: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(pidbuf, OWRITE);
data/scm-5f2/scm.c:451:18:  [2] (obsolete) gsignal:
  These functions are considered obsolete on most systems, and very
  non-portable (Linux-based systems handle them radically different,
  basically if gsignal/ssignal were the same as raise/signal respectively,
  while System V considers them a separate set and obsolete) (CWE-676).
  Switch to raise/signal, or some other signalling approach.
  return MAKINUM(gsignal((int)INUM(sig)));
data/scm-5f2/scm.c:675:9:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    i = atol((0==argv[1][2] && 3 <= argc && argv[2]) ? argv[2] : &argv[1][2]);
data/scm-5f2/scm.c:796:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[40];
data/scm-5f2/scm.c:805:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(buf, "#d/");
data/scm-5f2/scm.c:807:14:  [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).
    if ((t = open(buf, 0)) < 0) return 0;
data/scm-5f2/scm.c:895: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).
      if (pid==atoi(wm.pid)) {
data/scm-5f2/scm.h:410:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 SNAME(x) ((char *)(subrs[NUMDIGS(x)].name))
data/scm-5f2/scmfig.h:227:10:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
# define bcopy			memcpy
data/scm-5f2/scmfig.h:227:18:  [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 bcopy			memcpy
data/scm-5f2/script.c:74:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  SYSCALL(f = fopen(path, "r"););
data/scm-5f2/script.c:114: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 tbuf[MAXPATHLEN];
data/scm-5f2/script.c:120:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  f = fopen(name, "r");
data/scm-5f2/script.c:153: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 exec_buf[MAX_PATH];
data/scm-5f2/script.c:364:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(argv[++argi], "r");
data/scm-5f2/socket.c:402:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&soka.sun_path, CHARS(address), 1+LENGTH(address));
data/scm-5f2/socket.c:431:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&sa_server.sun_path, CHARS(address), 1+LENGTH(address));
data/scm-5f2/sys.c:157: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 cmodes[4];
data/scm-5f2/sys.c:168:21:  [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).
  SCM_OPENCALL((f = fopen(CHARS(filename), cmodes)));
data/scm-5f2/sys.c:265:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[L_tmpnam];
data/scm-5f2/sys.c:686: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 errbuf[SYS_ERRP_SIZE];
data/scm-5f2/sys.c:1415:39:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    for (i = len;i--;) if (((unsigned char *)name)[i] != tmp[i]) goto trynext;
data/scm-5f2/sys.c:1446:39:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    for (i = len;i--;) if (((unsigned char *)name)[i] != tmp[i]) goto trynext;
data/scm-5f2/sys.c:2452:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      free((char *)hplims[hplim_ind]);
data/scm-5f2/sys.c:2819:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      free((char *)hplims[i-2]);
data/scm-5f2/unexalpha.c:120:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[BUFSIZE];
data/scm-5f2/unexalpha.c:122:14:  [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).
  if ((old = open (a_name, O_RDONLY)) < 0)
data/scm-5f2/unexalpha.c:228:3:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  bcopy (data_section, &old_data_scnhdr, sizeof (old_data_scnhdr));
data/scm-5f2/unexalpha.c:296:7:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      bcopy (got_section, buffer, sizeof (struct scnhdr));
data/scm-5f2/unexalpha.c:344:3:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  bcopy (oldptr + nhdr.fhdr.f_symptr, buffer, cbHDRR);
data/scm-5f2/unexec.c:378:26:  [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).
  if (a_name && (a_out = open (a_name, O_RDONLY)) < 0)
data/scm-5f2/unexec.c:866: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 page[BUFSIZ];
data/scm-5f2/unexec.c:960: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 command[1024];
data/scm-5f2/unexec.c:961: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 errbuf[1024];
data/scm-5f2/unexec.c:962: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 address_text[32];
data/scm-5f2/unexec.c:976:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf (errbuf, "Could not open pipe");
data/scm-5f2/unexec.c:1043:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[80];
data/scm-5f2/unexec.c:1049: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 zeros[1 << 13];
data/scm-5f2/unexec.c:1081:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf (buf,
data/scm-5f2/unexec.c:1102: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 page[1024];
data/scm-5f2/unexec.c:1204:14:  [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).
  if ((new = open (new_name, O_RDWR)) < 0)
data/scm-5f2/unexelf.c:689:14:  [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).
  old_file = open (old_name, O_RDONLY);
data/scm-5f2/unexelf.c:698:13:  [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).
  mmap_fd = open ("/dev/zero", O_RDONLY);
data/scm-5f2/unexelf.c:788:14:  [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).
  new_file = open (new_name, O_RDWR | O_CREAT, 0666);
data/scm-5f2/unexelf.c:810: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 (new_file_h, old_file_h, old_file_h->e_ehsize);
data/scm-5f2/unexelf.c:811: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 (new_program_h, old_program_h,
data/scm-5f2/unexelf.c:908:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy (&NEW_SECTION_H (nn), &OLD_SECTION_H (old_data_index),
data/scm-5f2/unexelf.c:920:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy (NEW_SECTION_H (nn).sh_offset + new_base,
data/scm-5f2/unexelf.c:926:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (&NEW_SECTION_H (nn), &OLD_SECTION_H (n),
data/scm-5f2/unexelf.c:1048:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (NEW_SECTION_H (nn).sh_offset + new_base, src,
data/scm-5f2/unexelf.c:1140: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_phdrr->cbLineOffset + new_base,
data/scm-5f2/unexelf.c:1192:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy (&symp->st_value, &new_bss_addr, sizeof (new_bss_addr));
data/scm-5f2/unexelf.c:1245:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		  memcpy (new_base + addr, old_base + addr, sizeof(ElfW(Addr)));
data/scm-5f2/unexhp9k800.c:93: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).
  old = open (old_name, O_RDONLY);
data/scm-5f2/unexhp9k800.c:96: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).
  new = open (new_name, O_CREAT|O_RDWR|O_TRUNC, 0777);
data/scm-5f2/unexmacosx.c:220:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[UNEXEC_COPY_BUFSZ];
data/scm-5f2/unexmacosx.c:247:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[UNEXEC_COPY_BUFSZ];
data/scm-5f2/unexmacosx.c:637:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (lca[i], &lc, sizeof (struct load_command));
data/scm-5f2/unexmacosx.c:1078:10:  [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).
  infd = open (infile, O_RDONLY, 0);
data/scm-5f2/unexmacosx.c:1084:11:  [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).
  outfd = open (outfile, O_WRONLY | O_TRUNC | O_CREAT, 0755);
data/scm-5f2/unexmacosx.c:1118: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 c[8];
data/scm-5f2/unexmacosx.c:1186:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy (p, old_ptr, size);
data/scm-5f2/unexsgi.c:543:14:  [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).
  old_file = open (old_name, O_RDONLY);
data/scm-5f2/unexsgi.c:618:14:  [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).
  new_file = open (new_name, O_RDWR | O_CREAT, 0666);
data/scm-5f2/unexsgi.c:642: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 (new_file_h, old_file_h, old_file_h->e_ehsize);
data/scm-5f2/unexsgi.c:643: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 (new_program_h, old_program_h,
data/scm-5f2/unexsgi.c:730:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy (&NEW_SECTION_H (nn), &OLD_SECTION_H (old_data_index),
data/scm-5f2/unexsgi.c:742:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy (NEW_SECTION_H (nn).sh_offset + new_base, 
data/scm-5f2/unexsgi.c:746:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy (&NEW_SECTION_H (nn), &OLD_SECTION_H (n), 
data/scm-5f2/unexsgi.c:760: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 (&NEW_SECTION_H (nn), &OLD_SECTION_H (n), 
data/scm-5f2/unexsgi.c:795:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (NEW_SECTION_H (nn).sh_offset + new_base, src,
data/scm-5f2/unexsgi.c:840: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_phdrr->cbLineOffset + new_base,
data/scm-5f2/unexsunos4.c:110:13:  [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).
  if ((fd = open (a_name, O_RDONLY)) < 0)
data/scm-5f2/unexsunos4.c:116:14:  [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).
  if ((new = open (new_name, O_WRONLY | O_CREAT, 0666)) == -1)
data/scm-5f2/unexsunos4.c:280: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 aout[MAXPATHLEN];
data/scm-5f2/unexsunos4.c:348: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 (filename, O_RDONLY);
data/scm-5f2/unif.c:878:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    return MAKINUM(((unsigned char *)CDR(v))[pos]);
data/scm-5f2/unif.c:880:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    return MAKINUM(((signed char *)CDR(v))[pos]);
data/scm-5f2/unif.c:948:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    return MAKINUM(((unsigned char *)CDR(v))[pos]);
data/scm-5f2/unif.c:950:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    return MAKINUM(((signed char *)CDR(v))[pos]);
data/scm-5f2/unif.c:1067: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.
    ((unsigned char *)VELTS(v))[pos] = num2uchar(obj, (char *)ARG2, s_aset); break;
data/scm-5f2/unif.c:1069: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.
    ((signed char *)VELTS(v))[pos] = num2char(obj, (char *)ARG2, s_aset); break;
data/scm-5f2/unif.c:1290: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 cnt_tab[16] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4};
data/scm-5f2/unix.c:113:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1024];
data/scm-5f2/x.c:606:9:  [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(ec, e, sizeof(XEvent));
data/scm-5f2/x.c:1646:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer_return[1024];
data/scm-5f2/x.c:1920:42:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      case 8: datum = MAKINUM(((unsigned char *)data)[cnt]); break;
data/scm-5f2/x.c:1927:33:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      case 8: datum = MAKINUM(((char *)data)[cnt]); break;
data/scm-5f2/edline.c:39:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  SETLENGTH(res, strlen(s), tc7_string);
data/scm-5f2/eval.c:3452:12:  [1] (buffer) equal:
  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.
    return equal(s1, s2);
data/scm-5f2/findexec.c:140:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  register char *p = (char *) malloc(strlen(s)+1);
data/scm-5f2/findexec.c:167:5:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
    strcpy (tbuf, ".");		/* in case getcwd doesn't work */
data/scm-5f2/findexec.c:172:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if ('/' != tbuf[strlen(tbuf) - 1]) strcat(tbuf, "/");
data/scm-5f2/findexec.c:172:42:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
      if ('/' != tbuf[strlen(tbuf) - 1]) strcat(tbuf, "/");
data/scm-5f2/findexec.c:189: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).
      next = tbuf + strlen(tbuf);
data/scm-5f2/findexec.c:204:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(tbuf, "/");
data/scm-5f2/gmalloc.c:109:16:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
extern __ptr_t memalign PP ((__malloc_size_t __alignment,
data/scm-5f2/gmalloc.c:1517:1:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
memalign (alignment, size)
data/scm-5f2/gmalloc.c:1648:10:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
  return memalign (pagesize, size);
data/scm-5f2/ioext.c:544:18:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  return MAKINUM(umask(INUM(mode)));
data/scm-5f2/ramap.c:572:10:  [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.
    goto mismatch;
data/scm-5f2/ramap.c:575:10:  [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.
    goto mismatch;
data/scm-5f2/ramap.c:581:10:  [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.
    goto mismatch;
data/scm-5f2/ramap.c:587:10:  [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.
    goto mismatch;
data/scm-5f2/ramap.c:592:10:  [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.
    goto mismatch;
data/scm-5f2/ramap.c:596:10:  [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.
    goto mismatch;
data/scm-5f2/ramap.c:598:3:  [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.
  mismatch: ARRAY_V(res) = make_vector(MAKINUM(1L), s);
data/scm-5f2/ramap.c:1696:13:  [1] (buffer) equal:
  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.
	if (FALSEP(equal(RVREF(ra0, i0, e0), RVREF(ra1, i1, e1))))
data/scm-5f2/ramap.c:1801:21:  [1] (buffer) equal:
  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.
  callequal: return equal(ra0, ra1);
data/scm-5f2/record.c:341:16:  [1] (buffer) equal:
  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.
    if (FALSEP(equal(VELTS(rec0)[i], VELTS(rec1)[i])))
data/scm-5f2/repl.c:762:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  c = (ptobs[i].fgetc)(f);
data/scm-5f2/repl.c:764:25:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  SYSCALL(c = (ptobs[i].fgetc)(f););
data/scm-5f2/repl.c:1286:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    proc = CDR(intern(name, (sizet)strlen(name)));
data/scm-5f2/repl.c:1346:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	SCM proc = CDR(intern(name, (sizet)strlen(name)));
data/scm-5f2/rgx.c:418: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).
	pattern = ALLOCA(strlen(CHARS(RGX_PATTERN(prog)))+2);
data/scm-5f2/rope.c:189:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return makfromstr(src, (sizet) strlen(src));
data/scm-5f2/rope.c:230:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    must_free(argv[i], 1+strlen(argv[i]));
data/scm-5f2/rope.c:241: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).
  SETLENGTH(lsym, strlen(str), tc7_ssymbol);
data/scm-5f2/rope.c:250: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).
  SETLENGTH(lsym, strlen(str), tc7_ssymbol);
data/scm-5f2/scl.c:1159:16:  [1] (buffer) equal:
  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.
    if (FALSEP(equal(VELTS(x)[i], VELTS(y)[i]))) return BOOL_F;
data/scm-5f2/scl.c:1180:5:  [1] (buffer) equal:
  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.
SCM equal(x, y)
data/scm-5f2/scl.c:1189:16:  [1] (buffer) equal:
  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.
    if (FALSEP(equal(CAR(x), CAR(y)))) return BOOL_F;
data/scm-5f2/scm.c:417: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(ibuf);
data/scm-5f2/scm.c:863:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(execpath, CHARS(newpath), LENGTH(newpath) + 1);
data/scm-5f2/scm.h:106:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int   (*fgetc)P((FILE *p));
data/scm-5f2/scm.h:821:17:  [1] (buffer) equal:
  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.
SCM_EXPORT SCM  equal P((SCM x, SCM y));
data/scm-5f2/script.c:52: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).
  if (!n) n = strlen(str2);
data/scm-5f2/script.c:55:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      long len = strlen(str1);
data/scm-5f2/script.c:58:7:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
      strncat(str1 + len, str2, n);
data/scm-5f2/script.c:64:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
  strncat(str1, str2, n);
data/scm-5f2/script.c:122:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if ((fgetc(f)=='#') && (fgetc(f)=='!')) {
data/scm-5f2/script.c:122:27:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if ((fgetc(f)=='#') && (fgetc(f)=='!')) {
data/scm-5f2/script.c:123:35:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while (1) switch (tbuf[i++] = fgetc(f)) {
data/scm-5f2/script.c:149:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  char *extptr = exec_path + strlen(exec_path);
data/scm-5f2/script.c:165: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).
  extptr = exec_path + strlen(exec_path);
data/scm-5f2/script.c:195:2:  [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.
	strncpy(sepptr, "lib", 3);
data/scm-5f2/script.c:206:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(path + sepind - 4, peer, 3);
data/scm-5f2/script.c:221:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(path + sepind - 4, peer, 3);
data/scm-5f2/script.c:252:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(extptr)) {
data/scm-5f2/script.c:288:27:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while (1) switch (chr = getc(f)) {
data/scm-5f2/script.c:307:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      switch (chr = getc(f)) {
data/scm-5f2/script.c:316:32:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      switch (tbuf[tind - 1] = getc(f)) {
data/scm-5f2/script.c:332:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    chr = getc(f);
data/scm-5f2/script.c:367:25:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while (1) switch (getc(f)) {
data/scm-5f2/subr.c:216:15:  [1] (buffer) equal:
  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.
		if (NFALSEP(equal(CAR(lst), x))) return lst;
data/scm-5f2/subr.c:242:15:  [1] (buffer) equal:
  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.
		if (NFALSEP(equal(CAR(tmp), x))) return tmp;
data/scm-5f2/subr.c:2388:13:  [1] (buffer) equal:
  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.
	{"equal?", equal},
data/scm-5f2/sys.c:47:6:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int fgetc P((FILE* stream));
data/scm-5f2/sys.c:410: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).
  stwrite(s, 1, strlen(s), p);
data/scm-5f2/sys.c:510:3:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  fgetc,
data/scm-5f2/sys.c:528:3:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  fgetc};
data/scm-5f2/sys.c:572: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).
  sfwrite(s, 1, strlen(s), p);
data/scm-5f2/sys.c:725:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  syswrite(s, 1, strlen(s), p);
data/scm-5f2/sys.c:809: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).
  safewrite(s, 1, strlen(s), p);
data/scm-5f2/sys.c:1437: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).
  sizet len = strlen(name);
data/scm-5f2/unexalpha.c:51:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read (_fd, _buffer, _size) != _size) \
data/scm-5f2/unexalpha.c:481:12:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  int um = umask (777);
data/scm-5f2/unexalpha.c:482:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  umask (um);
data/scm-5f2/unexec.c:481:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read (a_out, &f_hdr, sizeof (f_hdr)) != sizeof (f_hdr))
data/scm-5f2/unexec.c:488:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  if (read (a_out, &f_ohdr, sizeof (f_ohdr)) != sizeof (f_ohdr))
data/scm-5f2/unexec.c:497:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read (a_out, &scntemp, sizeof (scntemp)) != sizeof (scntemp))
data/scm-5f2/unexec.c:669:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read (a_out, &scntemp, sizeof (scntemp)) != sizeof (scntemp))
data/scm-5f2/unexec.c:705:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read (a_out, &coffheader, sizeof coffheader) != sizeof coffheader)
data/scm-5f2/unexec.c:714:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read (a_out, &ohdr, sizeof hdr) != sizeof hdr)
data/scm-5f2/unexec.c:845:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read (a_out, &scntemp, sizeof (scntemp)) != sizeof (scntemp))
data/scm-5f2/unexec.c:874:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	      if (read (a_out, page, n) != n || write (new, page, n) != n)
data/scm-5f2/unexec.c:981:17:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ( ((c=getc(pfile)) != EOF) && (c != ' ') && (count < 31))
data/scm-5f2/unexec.c:1120:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while ((n = read (a_out, page, sizeof page)) > 0)
data/scm-5f2/unexec.c:1147:8:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  um = umask (777);
data/scm-5f2/unexec.c:1148:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  umask (um);
data/scm-5f2/unexec.c:1214:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      read (new, &symentry, SYMESZ);
data/scm-5f2/unexec.c:1217:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  read (new, &auxentry, AUXESZ);
data/scm-5f2/unexelf.c:713:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read (old_file, old_base, stat_buf.st_size) != stat_buf.st_size)
data/scm-5f2/unexelf.c:1280:7:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  n = umask (777);
data/scm-5f2/unexelf.c:1281:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  umask (n);
data/scm-5f2/unexhp9k800.c:184:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read (file, &subspace, sizeof (subspace)) != sizeof (subspace))
data/scm-5f2/unexhp9k800.c:213:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read (file, hdr, sizeof (*hdr)) != sizeof (*hdr))
data/scm-5f2/unexhp9k800.c:224:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read (file, auxhdr, sizeof (*auxhdr)) != sizeof (*auxhdr))
data/scm-5f2/unexhp9k800.c:277:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read (old, buffer, len) != len)
data/scm-5f2/unexhp9k800.c:293:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while ((len = read (old, buffer, sizeof (buffer))) > 0)
data/scm-5f2/unexmacosx.c:200:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return n == read (infd, dest, n);
data/scm-5f2/unexmacosx.c:258:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      bytes_read = read (infd, buf, bytes_to_read);
data/scm-5f2/unexmacosx.c:834:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy (sc.segname, SEG_DATA, 16);
data/scm-5f2/unexsgi.c:882:7:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  n = umask (777);
data/scm-5f2/unexsgi.c:883:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  umask (n);
data/scm-5f2/unexsunos4.c:351:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read (fd, &hdr, sizeof (hdr)) == sizeof (hdr)
data/scm-5f2/unexsunos4.c:357:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  read (fd, &filenames_cookie, sizeof (filenames_cookie));

ANALYSIS SUMMARY:

Hits = 303
Lines analyzed = 43572 in approximately 1.12 seconds (38778 lines/second)
Physical Source Lines of Code (SLOC) = 35468
Hits@level = [0] 114 [1]  99 [2] 134 [3]  19 [4]  43 [5]   8
Hits@level+ = [0+] 417 [1+] 303 [2+] 204 [3+]  70 [4+]  51 [5+]   8
Hits/KSLOC@level+ = [0+] 11.7571 [1+] 8.54291 [2+] 5.75166 [3+] 1.97361 [4+] 1.43792 [5+] 0.225555
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.