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/freebsd-buildutils-10.3~svn296373/src/contrib/flex/FlexLexer.h
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/ccl.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/dfa.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/ecs.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/filter.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/flexdef.h
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/flexint.h
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/gen.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/libmain.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/libyywrap.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/nfa.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/options.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/options.h
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/regex.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/scanflags.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/scanopt.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/scanopt.h
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/sym.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/tables.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/tables.h
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/tables_shared.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/tables_shared.h
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/tblcmp.c
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/version.h
Examining data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/yylex.c
Examining data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm.c
Examining data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm.h
Examining data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm_insformat.h
Examining data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
Examining data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/brandelf/brandelf.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/cksum/cksum.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/cksum/crc.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/cksum/crc32.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/cksum/extern.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/cksum/print.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/cksum/sum1.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/cksum/sum2.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/elfdump/elfdump.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/file2c/file2c.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/config.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initparse.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initparse.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initskel.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/GNode.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/buf.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/buf.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/cond.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/cond.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/config.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/dir.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/dir.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/for.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/for.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/globals.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/hash.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/hash.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/hash_tables.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/hash_tables.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/lst.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/lst.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/make.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/make.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/parse.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/parse.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/proc.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/proc.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/shell.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/shell.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/str.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/str.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/suff.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/suff.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/targ.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/targ.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/util.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/util.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/var.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/var.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/pathnames.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/btxld/btx.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/btxld/btxld.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/btxld/elfh.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/btxld/elfh.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/config.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/configvers.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkheaders.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkoptions.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/aouthdr.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/aouthdr.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/elfhdr.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/elfhdr.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgz.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzcmp.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzip.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzip.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzld.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/xio.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef_amd64.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef_i386.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef_nop.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef_obj.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef_powerpc.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef_sparc64.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/kldxref.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/excludes.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/mtree.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/compare.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/misc.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/mtree.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/verify.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/specspec.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/create.c
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/extern.h
Examining data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/spec.c

FINAL RESULTS:

data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/compare.c:126:8:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
			if (chown(p->fts_accpath, s->st_uid, -1))
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/compare.c:140:8:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
			if (chown(p->fts_accpath, -1, s->st_gid))
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/compare.c:156:8:  [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(p->fts_accpath, s->st_mode))
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/compare.c:387:13:  [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.
	if ((len = readlink(name, tbuf, sizeof(tbuf) - 1)) == -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/verify.c:238:7:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
		if (chown(path, p->st_uid, p->st_gid) == -1) {
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/verify.c:242:13:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
			else if (chown(path, (uid_t)-1, p->st_gid) == -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/verify.c:251: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(path, p->st_mode))
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c:79:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf (t, tsz, fmt, s);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c:180:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    snprintf(str, strsz, fmt, def, val);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c:200:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    snprintf(str, strsz, fmt, def);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/filter.c:187:4:  [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.
			execvp (chain->argv[0],
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/flexdef.h:887: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.
        fprintf (stderr,\
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/flexdef.h:896: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.
        fprintf (stderr,\
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/gen.c:877: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_map, useecs ?
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:348:4:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			snprintf (outfile_path, sizeof(outfile_path), outfile_template,
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:399:4:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			snprintf (pname, nbytes, tablesfile_template, prefix);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:457:14:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
             snprintf(str, strsz, fmt,      scname[i], i - 1);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:1795:3:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		snprintf (outfile_path, sizeof(outfile_path), outfile_template,
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:161: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 (&action_array[action_index], new_text);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:396:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf (errmsg, sizeof(errmsg), msg, arg);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:408:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf (errmsg, sizeof(errmsg)-1, msg, arg);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:421:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf (errmsg, sizeof(errmsg)-1, msg, arg);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:459:3:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		snprintf (directive, sizeof(directive), line_fmt, linenum, filename);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:461:3:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		snprintf (directive, sizeof(directive), line_fmt, 0, filename);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:684: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 (stdout, fmt, n);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:691: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 (stdout, fmt, n1, n2);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:698: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 (stdout, fmt, x);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:704: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 (stdout,fmt, str);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:710: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 (stdout,fmt, s1, s2, s3);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:717: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 (stdout,fmt, str, n);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:741:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(stdout, fmt, def, val?val:"");
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initparse.c:67:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf( fw3_msg, MAXLINE,(fmt), (a1), (a2) );\
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initparse.c:565:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	(void) snprintf( errmsg, sizeof(errmsg), msg, arg );
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initparse.c:587:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf( warn_msg, sizeof(warn_msg), msg, arg );
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initparse.c:609:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf( errmsg, sizeof(errmsg), msg, arg );
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:1958: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( nmstr, yytext ); \
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:2432:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy( nmstr, yytext );
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:2665:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy( (char *) nmdef, yytext );
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:3112:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy( nmstr, yytext + 1 );
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:3380:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy( nmstr, yytext );
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:3449:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy( nmstr, yytext + 1 );
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:706: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(ar->member, ar->nametab + offs);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:755: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(ar->member, ar->sname);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/dir.c:435: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(&file[(brace - word) + (cp - start)], end);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/hash.c:241: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(e->name, p);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:330: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(fp, targFmt, targPrefix, gn->name);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:667: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(job->cmdFILE, fmt, arg);	\
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:1435:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(args, "-%s%s", (job->flags & JOB_IGNERR) ? "" :
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:832:7:  [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.
		if (execvp(save_argv[0], save_argv) < 0) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/parse.c:323:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, ap);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/proc.c:116:3:  [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.
		execvp(ps->argv[0], ps->argv);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/proc.c:123:3:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execv(commandShell->path, ps->argv);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/util.c:83:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, ap);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/util.c:100:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, ap);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/util.c:123:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, ap);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/util.c:150:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, ap);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/util.c:179:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, ap);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/util.c:308:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
				fprintf(fp, par ? "|" : " ");
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/var.c:2609:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf(v, "${%s}", name);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/btxld/btxld.c:292:2:  [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.
	printf(binfo, btx.btx_majver, btx.btx_minver, btx.btx_textsz,
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/btxld/btxld.c:297:2:  [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.
	printf(cinfo, fmtlist[ihdr.fmt], ihdr.size, ihdr.text,
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/btxld/btxld.c:299:2:  [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.
	printf(oinfo, fmtlist[ohdr.fmt], ohdr.size, ohdr.text,
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:705:7:  [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.
	pp = popen(cmd, "r");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:68:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, ap);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzcmp.c:149:2:  [4] (shell) execlp:
  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.
	execlp("gzip", "gzip", "-9n", (char *)NULL);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzip.c:163: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(fn[i] + n, i == FN_OBJ ? SFX_OBJ : SFX_KGZ);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzld.c:88:6:  [4] (shell) execlp:
  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.
	    execlp("ld", "ld", "-aout", "-Z", "-T", addr, "-o", f2,
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzld.c:91:6:  [4] (shell) execlp:
  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.
	    execlp("ld", "ld", "-Ttext", addr, "-o", f2, loader, f1,
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/create.c:99:7:  [4] (misc) getlogin:
  It's often easy to fool getlogin. Sometimes it does not work at all,
  because some program messed up the utmp file. Often, it gives only the
  first 8 characters of the login name. The user currently logged in on the
  controlling tty of our program need not be the user who started it. Avoid
  getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid())
  and extract the desired information instead.
		    getlogin(), host);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/create.c:430:8:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	(void)vsnprintf(buf, sizeof(buf), fmt, ap);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/verify.c:171: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(tail, p->name);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:365: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 ( !(m4 = getenv("M4")))
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:1490: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 ("POSIXLY_CORRECT")) {
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/scanopt.c:141: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 ((env = getenv ("COLUMNS")) != NULL)
data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm.c:144:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "d:i:l:n:o:p:r:I:X")) != -1) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/brandelf/brandelf.c:69:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "f:lt:v")) != -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/cksum/cksum.c:83:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		while ((ch = getopt(argc, argv, "o:")) != -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/elfdump/elfdump.c:500:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(ac, av, "acdeiGhnprsw:")) != -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/file2c/file2c.c:35:14:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt(argc, argv, "n:sx")) != -1) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initparse.c:724: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 ((yys = getenv("YYDEBUG")) != 0)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:1980: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("POSIXLY_CORRECT") ) \
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:1618: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 ((tdir = getenv("TMPDIR")) == NULL)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:2315: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.
	env = getenv("MAKE_JOBS_FIFO");
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:294:8:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
			if (realpath(path, path) != NULL &&
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:300:14:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
		} else if (realpath(fname, path) != NULL) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:392:12:  [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.
		if ((c = getopt(argc, argv, OPTFLAGS)) == -1) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:696: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	*value = getenv(MKLVL_ENVVAR);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:897: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.
	save_makeflags = getenv("MAKEFLAGS");
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:953: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 ((machine = getenv("MACHINE")) == NULL) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:970: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.
	if ((machine_arch = getenv("MACHINE_ARCH")) == NULL) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:982: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 ((machine_cpu = getenv("MACHINE_CPU")) == NULL) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:1053: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.
	Main_ParseArgLine(getenv("MAKEFLAGS"), 1);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:1085: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 (!(pathp = getenv("MAKEOBJDIRPREFIX"))) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:1086: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 (!(path = getenv("MAKEOBJDIR"))) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:1114: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("MAKE_JOBS_FIFO") != NULL)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:1158: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.
		char *syspath = getenv("MAKESYSPATH");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/btxld/btxld.c:140:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((c = getopt(argc, argv, "qvb:E:e:f:l:o:P:W:")) != -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:119:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "CI:d:gmpVx:")) != -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:255:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if (realpath("../..", srcdir) == NULL)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:257: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 ((pwd = getenv("PWD")) != NULL && *pwd == '/' &&
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzip.c:72: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.
    tmpdir = getenv("TMPDIR");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzip.c:78:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((c = getopt(argc, argv, "cvf:l:o:")) != -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/kldxref.c:297:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "Rdf:v")) != -1) {
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/mtree.c:76:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ch = getopt(argc, argv, "cdef:iK:k:LnPp:qrs:UuwxX:")) != -1)
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c:102:20:  [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.
    for (dst = t + sprintf (t, "#line %d \"", lineno), src = filename; *src; *dst++ = *src++)
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c:267: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 ((char *) buf->elts + buf->nelts * buf->elt_size, ptr,
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/ecs.c:121:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 cclflags[CSIZE];	/* initialized to all '\0' */
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/filter.c:379: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	filename[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/flexdef.h:674:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char nmstr[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/gen.c:863: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    char_map[256];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/gen.c:976: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    NUL_ec_str[20];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:97: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    nmstr[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:136: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 outfile_path[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:402:20:  [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 ((tablesout = fopen (tablesfilename, "w")) == NULL)
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:419:30:  [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 (skelname && (skelfile = fopen (skelname, "r")) == NULL)
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:1495: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).
		backing_up_file = fopen (backing_name, "w");
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:97: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[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:123: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[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:394: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    errmsg[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:406: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    errmsg[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:419: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    errmsg[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:433: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    directive[MAXLINE], filename[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:753: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 rform[10];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:819: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_storage[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:835:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	       ((buf = (char *) skel[skel_ind++]) != 0)) {
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/nfa.c:203: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    action_text[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/regex.c:143: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[bufsz];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/scanopt.c:142: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).
		cols = atoi (env);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/scanopt.c:539: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    optchar[2];
data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm.c:169:20:  [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 ((listfile = fopen(optarg, "w")) == NULL) {
data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm.c:185: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).
			if ((ofile = fopen(optarg, "w")) == NULL) {
data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm.c:193:23:  [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 ((regdiagfile = fopen(optarg, "w")) == NULL) {
data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm.c:200:19:  [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 ((regfile = fopen(optarg, "w")) == NULL) {
data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm.c:333: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[255];
data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm.c:523: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[1024];
data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm.c:539:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((ifile = fopen(ifilename, "r")) == NULL) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/brandelf/brandelf.c:75: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).
			type = atoi(optarg);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/brandelf/brandelf.c:117: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[EI_NIDENT];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/brandelf/brandelf.c:119: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(argv[0], change || force ? O_RDWR : O_RDONLY, 0)) < 0) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/cksum/cksum.c:114: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 ((fd = open(fn, O_RDONLY, 0)) < 0) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/cksum/crc32.c:106:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFSIZ], *p ;
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/elfdump/elfdump.c:175: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 unknown_tag[48];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/elfdump/elfdump.c:255: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 machdesc[64];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/elfdump/elfdump.c:298: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 *ei_abis[256] = {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/elfdump/elfdump.c:319: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 unknown_buf[64]; 
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/elfdump/elfdump.c:536:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((out = fopen(optarg, "w")) == NULL)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/elfdump/elfdump.c:550:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fd = open(*av, O_RDONLY)) < 0 ||
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initparse.c:66: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 fw3_msg[MAXLINE];\
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initparse.c:524:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char action_text[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initparse.c:563: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 errmsg[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initparse.c:585: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 warn_msg[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initparse.c:607: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 errmsg[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initparse.c:629: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 warning[MAXLINE];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:5179:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		yyin = fopen( infilename, "r" );
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:143: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		sname[AR_NAMSIZ + 1]; /* short name */
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:507: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	magic[SARMAG];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:516:16:  [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 ((ar->fp = fopen(ar->fname, mode)) == NULL) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:550: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(sizeof(ar->hdr.ar_size), sizeof(ar->hdr.ar_date)) + 1];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:890: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		copy[AR_NAMSIZ + 1];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/buf.c:121: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(bp->end, bytes, len);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/dir.c:880: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 dirbase[MAXPATHLEN + 1], *db_end;
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/dir.c:881: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 try[MAXPATHLEN + 1], *try_end;
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/hash.h:61: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[1];	/* key string */
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:228: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	op_outBuf[JOB_BUFSIZE + 1];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:241: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	of_outFile[PATH_MAX];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:448: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 ((fd = open(template, O_RDWR, 0600)) < 0) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:1190:15:  [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).
			streamID = open(file, O_RDWR | O_CREAT, 0666);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:1350:22:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
	if ((ps.child_pid = vfork()) == -1) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:1421: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	args[10];	/* For merged arguments */
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:1479: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	*argv[4];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:1571: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	*argv[4];	/* Argument vector to shell */
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:1576: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	tfile[PATH_MAX];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:1637:14:  [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 ((tfd = mkstemp(tfile)) == -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:1817:22:  [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 ((job->outFd = mkstemp(job->outFile)) == -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:1927: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	inLine[132];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:2033: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(job->outBuf, &job->outBuf[i + 1],
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:2069:11:  [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).
		oFILE = fopen(job->outFile, "r");
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:2348:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fifoFd = open(env, O_RDWR, 0);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:2714:22:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
	if ((ps.child_pid = vfork()) == -1) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:2734: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	result[BUFSIZ];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:2994:22:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
	if ((ps.child_pid = vfork()) == -1) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:262: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, path[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:295:18:  [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).
			    (stream = fopen(path, "r")) != NULL) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:303:18:  [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 ((stream = fopen(fname, "r")) != NULL)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:307:18:  [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 ((stream = fopen(path, "r")) != NULL) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:314:18:  [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 ((stream = fopen(fname, "r")) != NULL)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:322:27:  [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 (!name || !(stream = fopen(name, "r"))) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.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 found_dir[MAXPATHLEN + 1];	/* for searching for sys.mk */
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:697: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).
	int	level = (value == NULL) ? 0 : atoi(value);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:704: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 new_value[32];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:705:3:  [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(new_value, "%d", level + 1);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:890: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 mdpath[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:891: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 obpath[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:892: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 cdpath[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:893: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 found_dir[MAXPATHLEN + 1];	/* for searching for sys.mk */
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/main.c:1034: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 tmp[64];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/parse.c:351: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).
			nf->F = fopen(fullname, "r");
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/str.c:118: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(result, s1, len1);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/str.c:130: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(result + len1, s2, len2 + 1);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/suff.c:1708: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(target->pref, sopref, prefLen);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/targ.c:320:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char	buf[128];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/var.c:692: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	errstr[3];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/var.c:1946: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	name[2];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/var.c:2038: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	name[2];
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/var.c:2142: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	vname[2];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/btxld/btxld.c:201:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char name[FILENAME_MAX];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/btxld/btxld.c:211: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).
	if ((fdi[i] = open(fname, O_RDONLY)) == -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/btxld/btxld.c:257: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).
    if ((fdo = open(name, O_CREAT | O_TRUNC | O_WRONLY, 0666)) == -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/btxld/btxld.c:448: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[8192];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/btxld/elfh.h:35: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 shstrtab[28];		/* section header string table */
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/config.h:193:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char	errbuf[80];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:74: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 	destdir[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:75: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 	srcdir[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:292: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 line[80];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:342: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 line[256];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:485: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).
		cff = fopen(cf->cfg_path, "r");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:512: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).
	fo = fopen(p, "w");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:559:17:  [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 ((from_fd = open(from_name, O_RDONLY)) < 0)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:562:15:  [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 ((to_fd = open(to_name, O_RDONLY)) < 0)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:685:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	r = open(file, O_RDONLY);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:754: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 line[BUFSIZ];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:763: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).
		versreq = atoi(line + 9);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:110: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 line[BUFSIZ];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:113:8:  [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).
	ifp = fopen(line, "r");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:116: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).
		ifp = fopen(line, "r");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:130: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 line[BUFSIZ];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:135:8:  [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).
	ofp = fopen(path("Makefile.new"), "w");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:187:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char line[BUFSIZ];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:191:8:  [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).
	ofp = fopen(path("hints.c.new"), "w");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:200: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).
		ifp = fopen(hint->hint_name, "r");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.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 line[BUFSIZ];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:250: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).
		ifp = fopen(env, "r");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:256:8:  [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).
	ofp = fopen(path("env.c.new"), "w");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:305: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 ifname[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:315:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(fname, "r");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:523: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 fname[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:669: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 cmd[128];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkoptions.c:65: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[40];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkoptions.c:174:8:  [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).
	inf = fopen(file, "r");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkoptions.c:176:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		outf = fopen(file, "w");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkoptions.c:269: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).
	outf = fopen(file, "w");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkoptions.c:293: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 hbuf[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkoptions.c:294: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 nbuf[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkoptions.c:366: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 genopt[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkoptions.c:368:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(fname, "r");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkoptions.c:411: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 fname[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/aouthdr.h:48: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 kgz[sizeof(KGZ__STR_KGZ)];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/aouthdr.h:49: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 kgz_ndata[sizeof(KGZ__STR_KGZ_NDATA)];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/elfhdr.h:51: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 zero[sizeof(KGZ_SHSTR_ZERO)];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/elfhdr.h:52: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 symtab[sizeof(KGZ_SHSTR_SYMTAB)];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/elfhdr.h:53: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 shstrtab[sizeof(KGZ_SHSTR_SHSTRTAB)];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/elfhdr.h:54: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 strtab[sizeof(KGZ_SHSTR_STRTAB)];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/elfhdr.h:55: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 data[sizeof(KGZ_SHSTR_DATA)];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/elfhdr.h:70: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 zero[sizeof(KGZ_STR_ZERO)];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/elfhdr.h:71: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 kgz[sizeof(KGZ_STR_KGZ)];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/elfhdr.h: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 kgz_ndata[sizeof(KGZ_STR_KGZ_NDATA)];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgz.h:46: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	ident[4];	/* identification */
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzcmp.c:64:19:  [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 ((idi.fd = open(idi.fname = f1, O_RDONLY)) == -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzcmp.c:66:19:  [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 ((ido.fd = open(ido.fname = f2, O_CREAT | O_TRUNC | O_WRONLY,
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzip.c:66: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 *fn[FN_CNT];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzip.c:152:12:  [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 ((fd = mkstemp(tname)) == -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzip.c:162: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(fn[i], p, n);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzld.c:52: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 addr[16];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzld.c:59: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).
	if ((idi.fd = open(idi.fname = f1, O_RDONLY)) == -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/kgzld.c:82:5:  [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(addr, "%#x", align(kh->dload + kh->dsize, 0x1000));
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/xio.c:52: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[8192];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/xio.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 buf[8192];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef.c:539:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fd = open(filename, O_RDONLY)) == -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef_obj.c:232:2:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	bcopy(ef->address + offset, dest, len);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef_obj.c:251:2:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	bcopy(ef->address + offset, dest, len);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef_obj.c:343:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fd = open(filename, O_RDONLY)) == -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef_sparc64.c:57: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((u_char *)dest + (relbase + a->r_offset -
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/kldxref.c:69: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 recbuf[MAXRECSIZE];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/kldxref.c:102: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(recbuf + recpos, buf, size);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/kldxref.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 kldmodname[MAXMODNAME + 1], cval[MAXMODNAME + 1], *cp;
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/kldxref.c:258:7:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	fd = mkstemp(dest);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/kldxref.c:265: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 xrefname[MAXPATHLEN], tempname[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/compare.c:207: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(p->fts_accpath, O_RDONLY, 0)) < 0) {
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/compare.c:252: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 *new_digest, buf[33];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/compare.c:270: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 *new_digest, buf[41];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/compare.c:288: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 *new_digest, buf[41];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/compare.c:306: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 *new_digest, buf[65];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/compare.c:383: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 lbuf[MAXPATHLEN * 4];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/compare.c:385: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 tbuf[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/create.c:90: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 *argv[2], host[MAXHOSTNAMELEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/create.c:223: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(p->fts_accpath, O_RDONLY, 0)) < 0 ||
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/create.c:231: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 *digest, buf[33];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/create.c:241: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 *digest, buf[41];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/create.c:251: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 *digest, buf[41];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/create.c:261: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 *digest, buf[65];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/create.c:428: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[1024];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/excludes.c:71:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(name, "r");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/excludes.c:86: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(str, line, len);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/extern.h:60:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char fullpath[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/mtree.c:58: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 fullpath[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/mtree.c:89:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
				spec1 = fopen(optarg, "r");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/mtree.c:93:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
				spec2 = fopen(optarg, "r");
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/mtree.h:102: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[1];			/* file name (must be last) */
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/spec.c:66: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[2048];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/verify.c:51: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 path[MAXPATHLEN];
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/verify.c:80: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 *argv[2];
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c:76: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).
	t = flex_alloc (tsz = strlen (fmt) + strlen (s) + 1);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c:76:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	t = flex_alloc (tsz = strlen (fmt) + strlen (s) + 1);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c:96: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).
    t = flex_alloc (strlen ("#line \"\"\n")          +   /* constant parts */
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c:97: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).
                    2 * strlen (filename)            +   /* filename with possibly all backslashes escaped */
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c:145:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return buf_strnappend (buf, str, strlen (str));
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c:176: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).
    str = (char*)flex_alloc(strsz = strlen(fmt) + strlen(def) + strlen(val) + 2);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c:176:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    str = (char*)flex_alloc(strsz = strlen(fmt) + strlen(def) + strlen(val) + 2);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c:176:65:  [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).
    str = (char*)flex_alloc(strsz = strlen(fmt) + strlen(def) + strlen(val) + 2);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c:196: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).
    str = (char*)flex_alloc(strsz = strlen(fmt) + strlen(def) + 2);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/buf.c:196:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    str = (char*)flex_alloc(strsz = strlen(fmt) + strlen(def) + 2);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:397: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).
			nbytes = strlen (prefix) + strlen (tablesfile_template) + 2;
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:397: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).
			nbytes = strlen (prefix) + strlen (tablesfile_template) + 2;
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:410: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).
		nbytes = strlen (prefix) + strlen ("tables") + 2;
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:410: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).
		nbytes = strlen (prefix) + strlen ("tables") + 2;
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:454:46:  [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).
             str = (char*)flex_alloc(strsz = strlen(fmt) + strlen(scname[i]) + NUMCHARLINES + 2);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:454:60:  [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).
             str = (char*)flex_alloc(strsz = strlen(fmt) + strlen(scname[i]) + NUMCHARLINES + 2);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/main.c:987: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).
	    program_name[strlen (program_name) - 1] == '+')
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:100: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).
	if ((int) strlen (defname) > MAXLINE / 2) {
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:127: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).
	if ((int) strlen (defname) > MAXLINE / 2) {
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:143: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).
	int     len = strlen (new_text);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:844: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 (buf[strlen (buf) - 1] == '\\')
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:855:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define cmd_match(s) (strncmp(buf,(s),strlen(s))==0)
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:866: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).
                out_str("%s\n", buf[strlen (buf) - 1] =='\\' ? "\\" : "");
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/misc.c:873: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).
                out_str("%s\n", buf[strlen (buf) - 1] =='\\' ? "\\" : "");
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/regex.c:91:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy (str, src + m->rm_so, len);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/scanopt.c:210: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).
		aux->printlen = strlen (opt->opt_fmt);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/scanopt.c:285: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).
		p = s->argv[0] + strlen (s->argv[0]);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/scanopt.c:394: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 (DESC (s, ue->idx));
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/scanopt.c:796: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).
			arglen = strlen (optarg);
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/tables.c:89:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	th->th_hsize = 14 + strlen (version_str) + 1 + strlen (name) + 1;
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/tables.c:89: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).
	th->th_hsize = 14 + strlen (version_str) + 1 + strlen (name) + 1;
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/tables.c:162: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).
	sz = strlen (th->th_version) + 1;
data/freebsd-buildutils-10.3~svn296373/src/contrib/flex/tables.c:167: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).
	sz = strlen (th->th_name) + 1;
data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm.c:580:13:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				input = getchar();
data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:91: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).
		key.size = strlen(symbol->name);
data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:175: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).
	key.size = strlen(name);
data/freebsd-buildutils-10.3~svn296373/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:450: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).
	num_tabs = 3 - (strlen(curnode->symbol->name) + 5) / 8;
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/brandelf/brandelf.c:124:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(fd, buffer, EI_NIDENT) < EI_NIDENT) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/cksum/crc.c:124:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((nr = read(fd, buf, sizeof(buf))) > 0)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/cksum/crc32.c:110:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((nr = read(fd, buf, sizeof(buf))) > 0)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/cksum/sum1.c:60:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((nr = read(fd, buf, sizeof(buf))) > 0)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/cksum/sum2.c:62:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((nr = read(fd, buf, sizeof(buf))) > 0)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/file2c/file2c.c:57:13:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while((c = getchar()) != EOF) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:1968: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).
	for ( i = strlen( str ) - 1; i >= start; --i ) \
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:2125:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:2555: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).
			infilename[strlen( infilename ) - 1] = '\0';
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:2630:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
buf_strnappend(&top_buf, escaped_qstart, strlen(escaped_qstart));
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:2635:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
buf_strnappend(&top_buf, escaped_qend, strlen(escaped_qend));
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:2673: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).
			for ( i = strlen( (char *) nmdef ) - 1;
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:3119: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).
			nmstr[strlen( nmstr ) - 1] = '\0';
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:3465: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( (char *) nmdefptr );
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:4092:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
fwrite (escaped_qstart, 1, strlen(escaped_qstart), yyout);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:4097: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).
fwrite (escaped_qend, 1, strlen(escaped_qend), yyout);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/lex/initscan.c:4860: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).
	return yy_scan_bytes(yystr,strlen(yystr) );
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:358: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).
			sz = strlen(memName) + strlen(libName) + 3;
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:358: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).
			sz = strlen(memName) + strlen(libName) + 3;
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:408: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).
				nsz = strlen(libName) + strlen(member) + 3;
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:408: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).
				nsz = strlen(libName) + strlen(member) + 3;
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:436:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			size_t	sz = strlen(libName) + strlen(memName) + 3;
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:436: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).
			size_t	sz = strlen(libName) + strlen(memName) + 3;
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:605:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (errno != 0 || strspn(end, " ") != strlen(end)) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:659:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (errno != 0 || strspn(end, " ") != strlen(end)) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:702: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).
		if (ar->mlen <= strlen(ar->nametab + offs)) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:703: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).
			ar->mlen = strlen(ar->nametab + offs) + 1;
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:751: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).
		if (strlen(ar->sname) >= ar->mlen) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:752: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).
			ar->mlen = strlen(ar->sname) + 1;
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:782: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).
	memset(ar->hdr.ar_date + strlen(ar->hdr.ar_date),
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:783: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).
	    ' ', sizeof(ar->hdr.ar_date) - strlen(ar->hdr.ar_date));
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:843: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).
		} else if (strlen(member) <= AR_NAMSIZ) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:852:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strlen(ar->member) == AR_NAMSIZ &&
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:967: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).
	if (member != NULL && strlen(member) > AR_NAMSIZ) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/arch.c:1148: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).
	sz = strlen(gn->name) + 4;
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/buf.c:229: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).
	Buf_AddBytes(bp, strlen(str), str);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/dir.c:412:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	otherLen = brace - word + strlen(end);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/dir.c:432:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(file, word, brace - word);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/dir.c:434:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(&file[brace - word], start, cp - start);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/dir.c:569: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).
						    &dirpath[strlen(dirpath)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/dir.c:692: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).
				p1 = pe->dir->name + strlen(pe->dir->name) - 1;
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/dir.c:885: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).
	db_end = dirbase + strlen(dirbase);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/dir.c:897: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).
				try_end = try + strlen(try);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:1199:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if (read(streamID, &c, 1) == 1) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:1874: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).
			cp = ecp + strlen(commandShell->noPrint);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:1937:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		nRead = read(job->inPipe, &job->outBuf[job->curPos],
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:2079: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).
				oendp = endp = inLine + strlen(inLine);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:2455:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		i = read(fifoFd, &c, 1);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/job.c:2736:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		rcnt = read(fds[0], result, sizeof(result));
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/parse.c:292: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).
	kw = keyword_hash(str, strlen(str));
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/parse.c:1714:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		return (fgetc(CURFILE->F));
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/parse.c:2359: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).
	    (size_t)(cp - start) != strlen(directives[dir].name) ||
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/proc.c:118: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).
		write(STDERR_FILENO, ps->argv[0], strlen(ps->argv[0]));
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/proc.c:120:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		write(STDERR_FILENO, strerror(errno), strlen(strerror(errno)));
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/str.c:111: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).
	len1 = strlen(s1);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/str.c:112: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).
	len2 = strlen(s2);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/str.c:294: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).
	ret = emalloc(strlen(str) * 2 + 1);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/str.c:500: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(w);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/str.c:514:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			*len = strlen(w);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/suff.c:191: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(str);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/suff.c:431:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strncmp(str, src->name, strlen(src->name)) == 0)
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/suff.c:628:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strncmp(transform->name, s->name, strlen(s->name)) == 0) {
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/suff.c:629: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).
		cp = transform->name + strlen(s->name);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/suff.c:700: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).
	s->nameLen = strlen(s->name);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/suff.c:1090: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).
	prefLen = strlen(targ->pref);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/suff.c:1649:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	eoname = gn->name + strlen(gn->name);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/suff.c:1820: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).
					int	savep = strlen(gn->path) -
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/var.c:459: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).
	wordLen = strlen(word);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/var.c:1250: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).
		Buf_AddBytes(buf, strlen(aa.argv[i]), (Byte *)aa.argv[i]);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/var.c:1913:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(value, vp->input, consumed);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/var.c:1928:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(value, vp->input, consumed);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/var.c:2008:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(value, vp->input, consumed);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/var.c:2023:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(value, vp->input, consumed);
data/freebsd-buildutils-10.3~svn296373/src/usr.bin/make/var.c:2608: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).
				v = emalloc(strlen(name) + 1 + 3);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/btxld/btxld.c:472:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((n = read(fd, buf, nbyte)) == -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:180: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(destdir);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:298:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((ch = getc(fp)) != EOF)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:322:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((ch = getc(fp)) != EOF) {
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:348:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((ch = getc(fp)) != EOF)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:370:16:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((ch = getc(fp)) != EOF) {
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:390:16:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((ch = getc(fp)) != EOF) {
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:448:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			for (i = 0; i < strlen(ol->op_value); i++) {
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:490:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((i = getc(cff)) != EOF) {
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:536:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	p += strlen(KERNCONFTAG);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:618: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(dp->d_name);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/main.c:721:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		r = fgetc(fp);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:566: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(tp->f_fn);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:594: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).
		cp = sp + (len = strlen(sp)) - 1;
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:597: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(tp->f_objprefix);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:617: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).
	if (tag[strlen(tag) - 1] == '\n')
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:618: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).
		tag[strlen(tag) - 1] = '\0';
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:623: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).
	slen = strlen(suff);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:629: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(tp->f_fn);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:674: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).
		cp = (np = ftp->f_fn) + strlen(ftp->f_fn) - 1;
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:732: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).
		if (strlen(ftp->f_objprefix))
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/config/mkmakefile.c:754: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(tp->f_clean);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kgzip/xio.c:94:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((n = read(id->fd, buf, nbyte)) == -1)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef.c:221:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(name) + sizeof("__start_set_"); /* sizeof includes \0 */
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef.c:431:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	r = read(ef->ef_fd, dest, len);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef.c:558:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		res = read(fd, hdr, sizeof(*hdr));
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef.h:17:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    (ef)->ef_ops->read((ef)->ef_ef, offset, len, dest)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef.h:41:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int (*read)(elf_file_t ef, Elf_Off offset, size_t len, void* dest);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef_obj.c:201:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	r = read(ef->ef_fd, dest, len);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/ef_obj.c:361:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	res = read(fd, hdr, sizeof(*hdr));
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/kldxref.c:128: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).
	val = len = strlen(str);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/kldxref/kldxref.c:211:46:  [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).
		nmlen = (cp != NULL) ? cp - kldname : (int)strlen(kldname);
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/create.c:433: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).
	if (*offset + strlen(buf) > MAXLINELEN - 3) {
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/spec.c:142:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if ((centry = calloc(1, sizeof(NODE) + strlen(p))) == NULL)
data/freebsd-buildutils-10.3~svn296373/src/usr.sbin/mtree/spec.c:253: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).
			ip->slink = malloc(strlen(val) + 1);

ANALYSIS SUMMARY:

Hits = 447
Lines analyzed = 59246 in approximately 1.67 seconds (35533 lines/second)
Physical Source Lines of Code (SLOC) = 38127
Hits@level = [0] 683 [1] 146 [2] 197 [3]  33 [4]  64 [5]   7
Hits@level+ = [0+] 1130 [1+] 447 [2+] 301 [3+] 104 [4+]  71 [5+]   7
Hits/KSLOC@level+ = [0+] 29.6378 [1+] 11.724 [2+] 7.89467 [3+] 2.72773 [4+] 1.8622 [5+] 0.183597
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.