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/distcc-3.3.3/include_server/c_extensions/distcc_pump_c_extensions_module.c
Examining data/distcc-3.3.3/include_server/test_data/abc_post.c
Examining data/distcc-3.3.3/include_server/test_data/abc_pre.c
Examining data/distcc-3.3.3/include_server/test_data/computed_includes.c
Examining data/distcc-3.3.3/include_server/test_data/contains_abs_include.c
Examining data/distcc-3.3.3/include_server/test_data/dbar/dbar1/bar.h
Examining data/distcc-3.3.3/include_server/test_data/dbar/foo.h
Examining data/distcc-3.3.3/include_server/test_data/dfoo/foo.h
Examining data/distcc-3.3.3/include_server/test_data/dfoo/foo2.h
Examining data/distcc-3.3.3/include_server/test_data/dfoo/i_am_perhaps_a_directory.h
Examining data/distcc-3.3.3/include_server/test_data/dfoo/include_next_foo.h
Examining data/distcc-3.3.3/include_server/test_data/dfoo/stat_triggers.h
Examining data/distcc-3.3.3/include_server/test_data/distcc/src/bulk.h
Examining data/distcc-3.3.3/include_server/test_data/distcc/src/compile.h
Examining data/distcc-3.3.3/include_server/test_data/distcc/src/config.h
Examining data/distcc-3.3.3/include_server/test_data/distcc/src/distcc.c
Examining data/distcc-3.3.3/include_server/test_data/distcc/src/distcc.h
Examining data/distcc-3.3.3/include_server/test_data/distcc/src/emaillog.h
Examining data/distcc-3.3.3/include_server/test_data/distcc/src/exitcode.h
Examining data/distcc-3.3.3/include_server/test_data/distcc/src/hosts.h
Examining data/distcc-3.3.3/include_server/test_data/distcc/src/implicit.h
Examining data/distcc-3.3.3/include_server/test_data/distcc/src/include_me.h
Examining data/distcc-3.3.3/include_server/test_data/distcc/src/state.h
Examining data/distcc-3.3.3/include_server/test_data/distcc/src/trace.h
Examining data/distcc-3.3.3/include_server/test_data/distcc/src/util.h
Examining data/distcc-3.3.3/include_server/test_data/func_macro.c
Examining data/distcc-3.3.3/include_server/test_data/include_include_next_foo.h
Examining data/distcc-3.3.3/include_server/test_data/maps/foo.tpl.varnames.h
Examining data/distcc-3.3.3/include_server/test_data/more_macros.c
Examining data/distcc-3.3.3/include_server/test_data/p1.h
Examining data/distcc-3.3.3/include_server/test_data/parse.c
Examining data/distcc-3.3.3/include_server/test_data/stat_triggers.c
Examining data/distcc-3.3.3/include_server/test_data/stat_triggers.h
Examining data/distcc-3.3.3/include_server/test_data/test_computed_includes/helper.c
Examining data/distcc-3.3.3/include_server/test_data/test_computed_includes/incl.h
Examining data/distcc-3.3.3/include_server/test_data/test_computed_includes/inclA.h
Examining data/distcc-3.3.3/include_server/test_data/test_computed_includes/src.c
Examining data/distcc-3.3.3/include_server/test_data/test_computed_includes/srcA.c
Examining data/distcc-3.3.3/include_server/test_data/test_directory_probing.c
Examining data/distcc-3.3.3/include_server/test_data/test_include_next/bar/x.h
Examining data/distcc-3.3.3/include_server/test_data/test_include_next/bar/y.h
Examining data/distcc-3.3.3/include_server/test_data/test_include_next/baz/start_x.c
Examining data/distcc-3.3.3/include_server/test_data/test_include_next/baz/start_y.c
Examining data/distcc-3.3.3/include_server/test_data/test_include_next/baz/x.h
Examining data/distcc-3.3.3/include_server/test_data/test_include_next/baz/y.h
Examining data/distcc-3.3.3/include_server/test_data/test_include_next/biz/x.h
Examining data/distcc-3.3.3/include_server/test_data/test_include_next/foo/x.h
Examining data/distcc-3.3.3/include_server/test_data/test_include_next/foo/y.h
Examining data/distcc-3.3.3/lzo/lzoconf.h
Examining data/distcc-3.3.3/lzo/lzodefs.h
Examining data/distcc-3.3.3/lzo/minilzo.c
Examining data/distcc-3.3.3/lzo/minilzo.h
Examining data/distcc-3.3.3/lzo/testmini.c
Examining data/distcc-3.3.3/popt/findme.c
Examining data/distcc-3.3.3/popt/findme.h
Examining data/distcc-3.3.3/popt/popt.c
Examining data/distcc-3.3.3/popt/popt.h
Examining data/distcc-3.3.3/popt/poptconfig.c
Examining data/distcc-3.3.3/popt/popthelp.c
Examining data/distcc-3.3.3/popt/poptint.h
Examining data/distcc-3.3.3/popt/poptparse.c
Examining data/distcc-3.3.3/popt/system.h
Examining data/distcc-3.3.3/src/access.c
Examining data/distcc-3.3.3/src/access.h
Examining data/distcc-3.3.3/src/arg.c
Examining data/distcc-3.3.3/src/argutil.c
Examining data/distcc-3.3.3/src/auth.h
Examining data/distcc-3.3.3/src/auth_common.c
Examining data/distcc-3.3.3/src/auth_distcc.c
Examining data/distcc-3.3.3/src/auth_distccd.c
Examining data/distcc-3.3.3/src/backoff.c
Examining data/distcc-3.3.3/src/bulk.c
Examining data/distcc-3.3.3/src/bulk.h
Examining data/distcc-3.3.3/src/cleanup.c
Examining data/distcc-3.3.3/src/climasq.c
Examining data/distcc-3.3.3/src/clinet.c
Examining data/distcc-3.3.3/src/clinet.h
Examining data/distcc-3.3.3/src/clirpc.c
Examining data/distcc-3.3.3/src/compile.c
Examining data/distcc-3.3.3/src/compile.h
Examining data/distcc-3.3.3/src/compress.c
Examining data/distcc-3.3.3/src/cpp.c
Examining data/distcc-3.3.3/src/daemon.c
Examining data/distcc-3.3.3/src/daemon.h
Examining data/distcc-3.3.3/src/distcc.c
Examining data/distcc-3.3.3/src/distcc.h
Examining data/distcc-3.3.3/src/dopt.c
Examining data/distcc-3.3.3/src/dopt.h
Examining data/distcc-3.3.3/src/dotd.c
Examining data/distcc-3.3.3/src/dotd.h
Examining data/distcc-3.3.3/src/dparent.c
Examining data/distcc-3.3.3/src/dsignal.c
Examining data/distcc-3.3.3/src/emaillog.c
Examining data/distcc-3.3.3/src/emaillog.h
Examining data/distcc-3.3.3/src/exec.c
Examining data/distcc-3.3.3/src/exec.h
Examining data/distcc-3.3.3/src/exitcode.h
Examining data/distcc-3.3.3/src/filename.c
Examining data/distcc-3.3.3/src/fix_debug_info.c
Examining data/distcc-3.3.3/src/fix_debug_info.h
Examining data/distcc-3.3.3/src/gcc-id.c
Examining data/distcc-3.3.3/src/h_argvtostr.c
Examining data/distcc-3.3.3/src/h_compile.c
Examining data/distcc-3.3.3/src/h_dotd.c
Examining data/distcc-3.3.3/src/h_exten.c
Examining data/distcc-3.3.3/src/h_getline.c
Examining data/distcc-3.3.3/src/h_hosts.c
Examining data/distcc-3.3.3/src/h_issource.c
Examining data/distcc-3.3.3/src/h_parsemask.c
Examining data/distcc-3.3.3/src/h_sa2str.c
Examining data/distcc-3.3.3/src/h_scanargs.c
Examining data/distcc-3.3.3/src/h_strip.c
Examining data/distcc-3.3.3/src/help.c
Examining data/distcc-3.3.3/src/history.c
Examining data/distcc-3.3.3/src/hostfile.c
Examining data/distcc-3.3.3/src/hosts.c
Examining data/distcc-3.3.3/src/hosts.h
Examining data/distcc-3.3.3/src/implicit.c
Examining data/distcc-3.3.3/src/implicit.h
Examining data/distcc-3.3.3/src/include_server_if.h
Examining data/distcc-3.3.3/src/io.c
Examining data/distcc-3.3.3/src/loadfile.c
Examining data/distcc-3.3.3/src/lock.c
Examining data/distcc-3.3.3/src/lock.h
Examining data/distcc-3.3.3/src/lsdistcc.c
Examining data/distcc-3.3.3/src/mon-gnome.c
Examining data/distcc-3.3.3/src/mon-notify.c
Examining data/distcc-3.3.3/src/mon-text.c
Examining data/distcc-3.3.3/src/mon.c
Examining data/distcc-3.3.3/src/mon.h
Examining data/distcc-3.3.3/src/ncpus.c
Examining data/distcc-3.3.3/src/netutil.c
Examining data/distcc-3.3.3/src/netutil.h
Examining data/distcc-3.3.3/src/prefork.c
Examining data/distcc-3.3.3/src/pump.c
Examining data/distcc-3.3.3/src/remote.c
Examining data/distcc-3.3.3/src/renderer.c
Examining data/distcc-3.3.3/src/renderer.h
Examining data/distcc-3.3.3/src/rpc.c
Examining data/distcc-3.3.3/src/rpc.h
Examining data/distcc-3.3.3/src/rslave.c
Examining data/distcc-3.3.3/src/rslave.h
Examining data/distcc-3.3.3/src/safeguard.c
Examining data/distcc-3.3.3/src/sendfile.c
Examining data/distcc-3.3.3/src/serve.c
Examining data/distcc-3.3.3/src/snprintf.c
Examining data/distcc-3.3.3/src/snprintf.h
Examining data/distcc-3.3.3/src/srvnet.c
Examining data/distcc-3.3.3/src/srvnet.h
Examining data/distcc-3.3.3/src/srvrpc.c
Examining data/distcc-3.3.3/src/ssh.c
Examining data/distcc-3.3.3/src/state.c
Examining data/distcc-3.3.3/src/state.h
Examining data/distcc-3.3.3/src/stats.c
Examining data/distcc-3.3.3/src/stringmap.c
Examining data/distcc-3.3.3/src/stringmap.h
Examining data/distcc-3.3.3/src/strip.c
Examining data/distcc-3.3.3/src/tempfile.c
Examining data/distcc-3.3.3/src/timefile.c
Examining data/distcc-3.3.3/src/timefile.h
Examining data/distcc-3.3.3/src/timeval.c
Examining data/distcc-3.3.3/src/timeval.h
Examining data/distcc-3.3.3/src/trace.c
Examining data/distcc-3.3.3/src/trace.h
Examining data/distcc-3.3.3/src/traceenv.c
Examining data/distcc-3.3.3/src/types.h
Examining data/distcc-3.3.3/src/util.c
Examining data/distcc-3.3.3/src/util.h
Examining data/distcc-3.3.3/src/va_copy.h
Examining data/distcc-3.3.3/src/where.c
Examining data/distcc-3.3.3/src/where.h
Examining data/distcc-3.3.3/src/zeroconf-reg.c
Examining data/distcc-3.3.3/src/zeroconf.c
Examining data/distcc-3.3.3/src/zeroconf.h
Examining data/distcc-3.3.3/src/setuid.c
Examining data/distcc-3.3.3/src/include_server_if.c
Examining data/distcc-3.3.3/src/stats.h

FINAL RESULTS:

data/distcc-3.3.3/src/clirpc.c:221:16:  [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(fname, points_to, MAXPATHLEN)) == -1) {
data/distcc-3.3.3/src/serve.c:342:20:  [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(buf, linkbuf, sizeof linkbuf)) <= 0)
data/distcc-3.3.3/src/util.c:383:20:  [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(buf, linkbuf, sizeof linkbuf)) <= 0)
data/distcc-3.3.3/include_server/test_data/distcc/src/trace.h:135:28:  [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.
    __attribute__ ((format(printf, 3, 4)))
data/distcc-3.3.3/include_server/test_data/test_computed_includes/src.c:6:3:  [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(MSG);
data/distcc-3.3.3/include_server/test_data/test_computed_includes/srcA.c:6:3:  [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(MSG);
data/distcc-3.3.3/popt/findme.c:28:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(pathbuf, path);
data/distcc-3.3.3/popt/findme.c:35:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf, "%s/%s", start, argv0);
data/distcc-3.3.3/popt/findme.c:37:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (!access(buf, X_OK))
data/distcc-3.3.3/popt/popt.c:190:24:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	if (t) con->appName = strcpy(t, name);
data/distcc-3.3.3/popt/popt.c:292:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(s, "--%s", longName);
data/distcc-3.3.3/popt/popt.c:384:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(s, "%s/%s", con->execPath, item->argv[0]);
data/distcc-3.3.3/popt/popt.c:445:10:  [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.
    rc = execvp(argv[0], (char *const *)argv);
data/distcc-3.3.3/popt/popt.c:741: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(alloca(strlen(origOptString) + 1), origOptString);
data/distcc-3.3.3/popt/popt.c:939:7:  [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,
data/distcc-3.3.3/popt/popt.c:965:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		    sprintf(s, "%s%s",
data/distcc-3.3.3/popt/poptconfig.c:183: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, home);
data/distcc-3.3.3/popt/popthelp.c:141:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(le, defstr);	le += strlen(le);
data/distcc-3.3.3/popt/popthelp.c:223:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(left, "-%c, %s%s", opt->shortName,
data/distcc-3.3.3/popt/popthelp.c:229:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(left, "%s%s",
data/distcc-3.3.3/popt/popthelp.c:251: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(te, help);	te += strlen(te);
data/distcc-3.3.3/popt/popthelp.c:254:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		    strcpy(te, defs);
data/distcc-3.3.3/popt/popthelp.c:292:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		le += sprintf(le, (ops ? "0x%lx" : "%ld"), aLong);
data/distcc-3.3.3/popt/popthelp.c:304: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(le, argDescrip);		le += strlen(le);
data/distcc-3.3.3/popt/popthelp.c:311:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    strcpy(le, argDescrip);		le += strlen(le);
data/distcc-3.3.3/popt/popthelp.c:345: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, format, help, " ");
data/distcc-3.3.3/popt/popthelp.c:486: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, POPT_("Usage:"));
data/distcc-3.3.3/popt/poptparse.c:39:16:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	dst += strlen(strcpy(dst, argv[i])) + 1;
data/distcc-3.3.3/popt/poptparse.c:190:6:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	    strcat(argstr, p);
data/distcc-3.3.3/popt/poptparse.c:219:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(argstr, p);
data/distcc-3.3.3/popt/poptparse.c:221:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(argstr, q);
data/distcc-3.3.3/popt/system.h:70:26:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
#define xstrdup(_str)   (strcpy((malloc(strlen(_str)+1) ? : vmefail()), (_str)))
data/distcc-3.3.3/src/argutil.c:158: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).
        strcpy(ss, a[i]);
data/distcc-3.3.3/src/auth_distccd.c:233:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(*principal, (char *) name_buffer.value);
data/distcc-3.3.3/src/auth_distccd.c:550:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    strcpy(*list, line);
data/distcc-3.3.3/src/climasq.c:109:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(buf + len, "/%s", progname);
data/distcc-3.3.3/src/climasq.c:110:17:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
            if (access(buf, X_OK) != 0)
data/distcc-3.3.3/src/compile.c:123:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(*filename, include_server_port);
data/distcc-3.3.3/src/compile.c:129:16:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        (void) strcpy(*filename + slash_pos, discrepancy_suffix);
data/distcc-3.3.3/src/compile.c:497:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(m, linkbuf);
data/distcc-3.3.3/src/compile.c:577:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(newcmd, t + strlen("-pc"));
data/distcc-3.3.3/src/compile.c:579: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).
        strcpy(newcmd, target_with_vendor);
data/distcc-3.3.3/src/compile.c:583:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(newcmd, argv[0]);
data/distcc-3.3.3/src/compile.c:601:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(binname, newcmd);
data/distcc-3.3.3/src/compile.c:602:13:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        r = access(binname, X_OK);
data/distcc-3.3.3/src/emaillog.c:152:9:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        execl(logmailer,
data/distcc-3.3.3/src/exec.c:204:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(cmdline, *ptr);
data/distcc-3.3.3/src/exec.c:252:5:  [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(argv[0], argv);
data/distcc-3.3.3/src/exec.c:266:9:  [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(slash + 1, argv);
data/distcc-3.3.3/src/filename.c:148:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(dot, new_ext);
data/distcc-3.3.3/src/fix_debug_info.c:444: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(client_path_plus_slashes, client_path);
data/distcc-3.3.3/src/gcc-id.c:58:15:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (!(p = popen(cmdline, "r"))) {
data/distcc-3.3.3/src/gcc-id.c:100: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(stype, nbytes, "_%s--%s._sub." DCC_DNS_SERVICE_TYPE, machine, version);
data/distcc-3.3.3/src/hosts.c:177:29:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        if (path != NULL && access(path, R_OK) == 0) {
data/distcc-3.3.3/src/hosts.c:188:25:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (path != NULL && access(path, R_OK) == 0) {
data/distcc-3.3.3/src/include_server_if.c:93:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(sa.sun_path, include_server_port);
data/distcc-3.3.3/src/lsdistcc.c:314:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf(canned_query,
data/distcc-3.3.3/src/lsdistcc.c:332:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf(canned_query,
data/distcc-3.3.3/src/lsdistcc.c:359:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf(canned_query,
data/distcc-3.3.3/src/lsdistcc.c:886:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf(thename, sformat[0], i);
data/distcc-3.3.3/src/lsdistcc.c:888: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).
        strcpy(thename, sformat[i-1]);
data/distcc-3.3.3/src/lsdistcc.c:891:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(thename, domain_name);
data/distcc-3.3.3/src/serve.c:407:17:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
            if (access(compiler_path, X_OK) < 0) {
data/distcc-3.3.3/src/serve.c:422:13:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        if (access(compiler_path, X_OK) < 0) {
data/distcc-3.3.3/src/serve.c:426:21:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
                if (access(compiler_path, X_OK) < 0) {
data/distcc-3.3.3/src/snprintf.c:815:6:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
 int vsnprintf (char *str, size_t count, const char *fmt, va_list args)
data/distcc-3.3.3/src/snprintf.c:830:6:  [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.
 int snprintf(char *str,size_t count,const char *fmt,...)
data/distcc-3.3.3/src/snprintf.c:836:11:  [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.
    ret = vsnprintf(str, count, fmt, ap);
data/distcc-3.3.3/src/snprintf.c:850:11:  [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.
    ret = vsnprintf(NULL, 0, format, ap2);
data/distcc-3.3.3/src/snprintf.c:858:11:  [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.
    ret = vsnprintf(*ptr, ret+1, format, ap2);
data/distcc-3.3.3/src/snprintf.c:902:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
 int sprintf(char *str,const char *fmt,...);
data/distcc-3.3.3/src/snprintf.c:965:22:  [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.
            int l1 = snprintf(NULL, 0, fp_fmt[x], fp_nums[y]);
data/distcc-3.3.3/src/snprintf.c:966:22:  [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.
            int l2 = snprintf(buf1, sizeof(buf1), fp_fmt[x], fp_nums[y]);
data/distcc-3.3.3/src/snprintf.c:967:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            sprintf (buf2, fp_fmt[x], fp_nums[y]);
data/distcc-3.3.3/src/snprintf.c:983:22:  [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.
            int l1 = snprintf(NULL, 0, int_fmt[x], int_nums[y]);
data/distcc-3.3.3/src/snprintf.c:984:22:  [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.
            int l2 = snprintf(buf1, sizeof(buf1), int_fmt[x], int_nums[y]);
data/distcc-3.3.3/src/snprintf.c:985:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            sprintf (buf2, int_fmt[x], int_nums[y]);
data/distcc-3.3.3/src/snprintf.c:1001:22:  [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.
            int l1 = snprintf(NULL, 0, str_fmt[x], str_vals[y]);
data/distcc-3.3.3/src/snprintf.c:1002:22:  [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.
            int l2 = snprintf(buf1, sizeof(buf1), str_fmt[x], str_vals[y]);
data/distcc-3.3.3/src/snprintf.c:1003:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            sprintf (buf2, str_fmt[x], str_vals[y]);
data/distcc-3.3.3/src/snprintf.h:31: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.
int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4);
data/distcc-3.3.3/src/snprintf.h:38:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
int vsnprintf(char *, size_t, const char *, va_list);
data/distcc-3.3.3/src/ssh.c:152:9:  [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(argv[0], (char **) argv);
data/distcc-3.3.3/src/stats.c:419:21:  [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.
        reply_len = snprintf(reply, 2048, replytemplate,
data/distcc-3.3.3/src/tempfile.c:145:18:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
    char* path = mktemp(pattern);
data/distcc-3.3.3/src/tempfile.c:390:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(tempdir, W_OK|X_OK) == -1) {
data/distcc-3.3.3/src/trace.c:248: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).
        strcpy(buf, rs_program_name);
data/distcc-3.3.3/src/trace.c:261:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf+len, "(%s) ", fn);
data/distcc-3.3.3/src/trace.c:267: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).
        strcpy(buf + len, sv);
data/distcc-3.3.3/src/trace.c:271:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(buf + len, buf_len - len, fmt, va);
data/distcc-3.3.3/src/trace.h:136:28:  [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.
    __attribute__ ((format(printf, 3, 4)))
data/distcc-3.3.3/src/util.c:378:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf + len, "/%s", compiler_name);
data/distcc-3.3.3/src/util.c:467: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).
        strcpy(slash, p+3);
data/distcc-3.3.3/src/util.c:607:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(loc, command);
data/distcc-3.3.3/src/util.c:608:15:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        ret = access(loc, X_OK);
data/distcc-3.3.3/src/util.c:655:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(statfile, procsubdir->d_name);
data/distcc-3.3.3/src/util.c:662:13:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        if (fscanf(f, "%*d %s %c %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %d",
data/distcc-3.3.3/src/util.c:735:22:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            retval = fscanf(f, " %*d %d %s", &minor, dev);
data/distcc-3.3.3/src/util.c:737:22:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            retval = fscanf(f, " %*d %d %*d %s", &minor, dev);
data/distcc-3.3.3/src/zeroconf.c:576:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(lock_file, "%s/lock", dir);
data/distcc-3.3.3/src/zeroconf.c:580:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(host_file, "%s/hosts", dir);
data/distcc-3.3.3/include_server/c_extensions/distcc_pump_c_extensions_module.c:345:9:  [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.
  res = realpath(in, resolved);
data/distcc-3.3.3/popt/findme.c:13: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 * path = getenv("PATH");
data/distcc-3.3.3/popt/popt.c:185:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("POSIXLY_CORRECT") || getenv("POSIX_ME_HARDER"))
data/distcc-3.3.3/popt/popt.c:185:38:  [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") || getenv("POSIX_ME_HARDER"))
data/distcc-3.3.3/popt/poptconfig.c:181: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 ((home = getenv("HOME"))) {
data/distcc-3.3.3/src/auth_distcc.c:165:26:  [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 ((princ_env_val = getenv("DISTCC_PRINCIPAL"))) {
data/distcc-3.3.3/src/auth_distccd.c:398: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.
    princ_env_val = getenv("DISTCCD_PRINCIPAL");
data/distcc-3.3.3/src/backoff.c:67:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    bp = getenv("DISTCC_BACKOFF_PERIOD");
data/distcc-3.3.3/src/backoff.c:79:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    bp = getenv("DISTCC_BACKOFF_PERIOD");
data/distcc-3.3.3/src/backoff.c:113:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    bp = getenv("DISTCC_BACKOFF_PERIOD");
data/distcc-3.3.3/src/climasq.c:65: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 (!(envpath = getenv("PATH")))
data/distcc-3.3.3/src/compile.c:85:32:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *user_setting = getenv("DISTCC_MAX_DISCREPANCY");
data/distcc-3.3.3/src/compile.c:107:39:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *include_server_port = getenv("INCLUDE_SERVER_PORT");
data/distcc-3.3.3/src/compile.c:226:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("CPATH") || getenv("C_INCLUDE_PATH")
data/distcc-3.3.3/src/compile.c:226:28:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("CPATH") || getenv("C_INCLUDE_PATH")
data/distcc-3.3.3/src/compile.c:227:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        || getenv("CPLUS_INCLUDE_PATH")) {
data/distcc-3.3.3/src/compile.c:419:39:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *include_server_port = getenv("INCLUDE_SERVER_PORT");
data/distcc-3.3.3/src/compile.c:428: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.
                getenv("DISTCC_EXCLUDE_FRESH_FILES");
data/distcc-3.3.3/src/compile.c:586:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    path = getenv("PATH");
data/distcc-3.3.3/src/compile.c:692:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (!getenv("DISTCC_NO_REWRITE_CROSS")) {
data/distcc-3.3.3/src/compile.c:866: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 (getenv("DISTCC_SKIP_LOCAL_RETRY")) {
data/distcc-3.3.3/src/daemon.c:144: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 ((path = getenv("DISTCCD_PATH")) != NULL) {
data/distcc-3.3.3/src/daemon.c:150: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.
        path = getenv("PATH");
data/distcc-3.3.3/src/distcc.c:212:25:  [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((princ_env_val = getenv("DISTCC_PRINCIPAL"))) {
data/distcc-3.3.3/src/dopt.c:237:26:  [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 ((princ_env_val = getenv("DISTCCD_PRINCIPAL"))) {
data/distcc-3.3.3/src/dotd.c:182:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    env_var = getenv("DEPENDENCIES_OUTPUT");
data/distcc-3.3.3/src/emaillog.c:124:24:  [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 ((whom_to_blame = getenv("DISTCC_EMAILLOG_WHOM_TO_BLAME"))
data/distcc-3.3.3/src/exec.c:209:12:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    bRet = CreateProcess(NULL,
data/distcc-3.3.3/src/exec.c:209:12:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    bRet = CreateProcess(NULL,
data/distcc-3.3.3/src/h_hosts.c:77:48:  [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.
        rs_log_error("failed to parse \"%s\"", getenv("DISTCC_HOSTS"));
data/distcc-3.3.3/src/hosts.c:167: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 ((env = getenv("DISTCC_HOSTS")) != NULL) {
data/distcc-3.3.3/src/hosts.c:682:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(rand_val);
data/distcc-3.3.3/src/include_server_if.c:71:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    stub = getenv("INCLUDE_SERVER_STUB");
data/distcc-3.3.3/src/include_server_if.c:80:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    include_server_port = getenv("INCLUDE_SERVER_PORT");
data/distcc-3.3.3/src/io.c:75:32:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *user_timeout = getenv("DISTCC_IO_TIMEOUT");
data/distcc-3.3.3/src/safeguard.c:55: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.
    char *env = getenv(dcc_safeguard_name);
data/distcc-3.3.3/src/serve.c:259: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.
        filename = getenv("DISTCC_CMDLIST");
data/distcc-3.3.3/src/serve.c:261:30:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            const char *nw = getenv("DISTCC_CMDLIST_NUMWORDS");
data/distcc-3.3.3/src/serve.c:318: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 (!(envpath = getenv("PATH"))) {
data/distcc-3.3.3/src/serve.c:762:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        !getenv("DISTCC_CMDLIST") &&
data/distcc-3.3.3/src/ssh.c:206:35:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (!ssh_cmd && (ssh_cmd_in = getenv("DISTCC_SSH"))) {
data/distcc-3.3.3/src/tempfile.c:207:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    d = getenv("TMPDIR");
data/distcc-3.3.3/src/tempfile.c:289: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 ((env = getenv("DISTCC_DIR"))) {
data/distcc-3.3.3/src/tempfile.c:298: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 ((env = getenv("HOME")) == NULL) {
data/distcc-3.3.3/src/traceenv.c:64: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.
    if ((logfile = getenv("DISTCC_LOG")) && logfile[0]) {
data/distcc-3.3.3/src/traceenv.c:78:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        if ((logfd_name = getenv("UNCACHED_ERR_FD")) == NULL ||
data/distcc-3.3.3/src/util.c:174:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    e = getenv(name);
data/distcc-3.3.3/src/util.c:233:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    envh = getenv("HOST");
data/distcc-3.3.3/src/util.c:241: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.
    envh2 = getenv("HOSTNAME");
data/distcc-3.3.3/src/util.c:353: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 (!(envpath = getenv("PATH"))) {
data/distcc-3.3.3/src/util.c:440:15:  [3] (buffer) getwd:
  This does not protect against buffer overflows by itself, so use with
  caution (CWE-120, CWE-20). Use getcwd instead.
        ret = getwd(buf);
data/distcc-3.3.3/src/util.c:588:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    path = getenv("PATH");
data/distcc-3.3.3/src/where.c:143: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 *pt = getenv("DISTCC_PAUSE_TIME_MSEC");
data/distcc-3.3.3/include_server/c_extensions/distcc_pump_c_extensions_module.c:335: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 resolved[DISTCC_PUMP_PATH_MAX];
data/distcc-3.3.3/include_server/test_data/distcc/src/distcc.c:166:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    compiler_name = (char *) dcc_find_basename(argv[0]);
data/distcc-3.3.3/include_server/test_data/distcc/src/state.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 file[128];             /**< Input filename  */
data/distcc-3.3.3/include_server/test_data/distcc/src/state.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 host[128];             /**< Destination host description */
data/distcc-3.3.3/lzo/lzodefs.h:1789:73:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#  define __lzo_byte_struct(s,n)        __lzo_struct_packed(s) unsigned char a[n]; __lzo_struct_packed_end()
data/distcc-3.3.3/lzo/lzodefs.h:1790:76:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#  define __lzo_byte_struct_ma(s,n)     __lzo_struct_packed_ma(s) unsigned char a[n]; __lzo_struct_packed_ma_end()
data/distcc-3.3.3/lzo/lzodefs.h:1792:61:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#  define __lzo_byte_struct(s,n)        struct s { unsigned char a[n]; } __attribute__((__packed__));
data/distcc-3.3.3/lzo/lzodefs.h:1793:61:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#  define __lzo_byte_struct_ma(s,n)     struct s { unsigned char a[n]; } __lzo_may_alias __attribute__((__packed__));
data/distcc-3.3.3/lzo/minilzo.c:1809:73:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#  define __lzo_byte_struct(s,n)        __lzo_struct_packed(s) unsigned char a[n]; __lzo_struct_packed_end()
data/distcc-3.3.3/lzo/minilzo.c:1810:76:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#  define __lzo_byte_struct_ma(s,n)     __lzo_struct_packed_ma(s) unsigned char a[n]; __lzo_struct_packed_ma_end()
data/distcc-3.3.3/lzo/minilzo.c:1812:61:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#  define __lzo_byte_struct(s,n)        struct s { unsigned char a[n]; } __attribute__((__packed__));
data/distcc-3.3.3/lzo/minilzo.c:1813:61:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#  define __lzo_byte_struct_ma(s,n)     struct s { unsigned char a[n]; } __lzo_may_alias __attribute__((__packed__));
data/distcc-3.3.3/lzo/minilzo.c:3450:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  undef memcpy
data/distcc-3.3.3/lzo/minilzo.c:3451:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define memcpy(a,b,c)         lzo_memcpy(a,b,c)
data/distcc-3.3.3/lzo/minilzo.c:3454:33:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define lzo_memcpy(a,b,c)     memcpy(a,b,c)
data/distcc-3.3.3/lzo/minilzo.c:3683:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
struct lzo_memops_TU2_struct { unsigned char a[2]; } __lzo_may_alias;
data/distcc-3.3.3/lzo/minilzo.c:3698:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
struct lzo_memops_TU4_struct { unsigned char a[4]; } __lzo_may_alias;
data/distcc-3.3.3/lzo/minilzo.c:3713:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
struct lzo_memops_TU8_struct { unsigned char a[8]; } __lzo_may_alias;
data/distcc-3.3.3/lzo/minilzo.c:4366:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    return memcpy(dest, src, len);
data/distcc-3.3.3/lzo/minilzo.c:4431:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char b[2*LZO_MAX(8,sizeof(lzo_uint))];
data/distcc-3.3.3/lzo/testmini.c:57:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char __LZO_MMODEL in  [ IN_LEN ];
data/distcc-3.3.3/lzo/testmini.c:58:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char __LZO_MMODEL out [ OUT_LEN ];
data/distcc-3.3.3/popt/popt.c:294: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(s, "-%c", shortName);
data/distcc-3.3.3/popt/popt.c:392: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(argv + argc, item->argv + 1, sizeof(*argv) * (item->argc - 1));
data/distcc-3.3.3/popt/popt.c:397: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(argv + argc, con->finalArgv,
data/distcc-3.3.3/popt/popt.c:406: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(argv + argc, con->leftovers, sizeof(*argv) * con->numLeftovers);
data/distcc-3.3.3/popt/popt.c:594:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(te, a, alen); te += alen;
data/distcc-3.3.3/popt/popt.c:969:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		    sprintf(s, "-%c", opt->shortName);
data/distcc-3.3.3/popt/poptconfig.c:103:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(fn, O_RDONLY);
data/distcc-3.3.3/popt/poptconfig.c:184:2:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	strcat(fn, "/.popt");
data/distcc-3.3.3/popt/popthelp.c:149:8:  [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.
	le += sprintf(le, "%ld", aLong);
data/distcc-3.3.3/popt/popthelp.c:153:8:  [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.
	le += sprintf(le, "%ld", aLong);
data/distcc-3.3.3/popt/popthelp.c:157:8:  [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.
	le += sprintf(le, "%g", aDouble);
data/distcc-3.3.3/popt/popthelp.c:161:8:  [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.
	le += sprintf(le, "%g", aDouble);
data/distcc-3.3.3/popt/popthelp.c:166:6:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	    strcpy(le, "null");	le += strlen(le);
data/distcc-3.3.3/popt/popthelp.c:172:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(le, "...");	le += strlen(le);
data/distcc-3.3.3/popt/popthelp.c:227:2:  [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(left, "-%c", opt->shortName);
data/distcc-3.3.3/popt/popthelp.c:335:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char format[30];
data/distcc-3.3.3/popt/popthelp.c:343:2:  [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(format, "%%.%ds\n%%%ds", (int) (ch - help), indentLength);
data/distcc-3.3.3/popt/popthelp.c:529: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 shortStr[2] = { '\0', '\0' };
data/distcc-3.3.3/popt/poptparse.c:131:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[999];
data/distcc-3.3.3/popt/poptparse.c:189:6:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	    strcat(argstr, " --");
data/distcc-3.3.3/popt/poptparse.c:218:2:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	strcat(argstr, " --");
data/distcc-3.3.3/popt/poptparse.c:220:2:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	strcat(argstr, "=\"");
data/distcc-3.3.3/src/access.c:232:21:  [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).
        mask_bits = atoi(mask_str);
data/distcc-3.3.3/src/auth_distccd.c:501: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 (!(file = fopen(arg_list_file, "r"))) {
data/distcc-3.3.3/src/auth_distccd.c:524: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 (!(file = fopen(arg_list_file, "r"))) {
data/distcc-3.3.3/src/backoff.c:68:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    if (bp && (atoi(bp) == 0))
data/distcc-3.3.3/src/backoff.c:80:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    if (bp && (atoi(bp) == 0))
data/distcc-3.3.3/src/backoff.c:115:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	dcc_backoff_period = atoi(bp);
data/distcc-3.3.3/src/bulk.c:86: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).
    *ifd = open(fname, O_RDONLY|O_BINARY);
data/distcc-3.3.3/src/bulk.c:275:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    ofd = open(filename, O_TRUNC|O_WRONLY|O_CREAT|O_BINARY, 0666);
data/distcc-3.3.3/src/cleanup.c:147:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(new_cleanups, (char **)cleanups, cleanups_size * sizeof(char *));
data/distcc-3.3.3/src/clinet.c:170: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 portname[20];
data/distcc-3.3.3/src/clinet.c:218: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(&sock_out.sin_addr, hp->h_addr, (size_t) hp->h_length);
data/distcc-3.3.3/src/clirpc.c:98: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 cwd[MAXPATHLEN + 1];
data/distcc-3.3.3/src/clirpc.c:256: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 link_points_to[MAXPATHLEN + 1];
data/distcc-3.3.3/src/compile.c:87:35:  [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 parsed_user_setting = atoi(user_setting);
data/distcc-3.3.3/src/compile.c:166: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 (!(discrepancy_file = fopen(discrepancy_filename, "a"))) {
data/distcc-3.3.3/src/compile.c:290:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(dotd_fname, "r")) == NULL) {
data/distcc-3.3.3/src/compile.c:454: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 linkbuf[MAXPATHLEN + 1], *link = NULL, *t;
data/distcc-3.3.3/src/compile.c:476:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    dir = open(link, O_RDONLY);
data/distcc-3.3.3/src/compile.c:494:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char m[MAXPATHLEN + 1];
data/distcc-3.3.3/src/compile.c:576:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(newcmd, target_with_vendor, t - target_with_vendor);
data/distcc-3.3.3/src/compile.c:588: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 binname[strlen(path) + 1 + strlen(newcmd) + 1];
data/distcc-3.3.3/src/compress.c:55: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 work_mem[LZO1X_1_MEM_COMPRESS];
data/distcc-3.3.3/src/daemon.c:296: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 ((fd = open(arg_log_file, O_CREAT|O_APPEND|O_WRONLY, 0666)) == -1) {
data/distcc-3.3.3/src/distcc.c:249:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    compiler_name = (char *) dcc_find_basename(argv[0]);
data/distcc-3.3.3/src/dotd.c:66: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(found, new_needle, new_needle_len);
data/distcc-3.3.3/src/dotd.c:87: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[2 * MAX_DOTD_LINE_LEN];
data/distcc-3.3.3/src/dotd.c:93: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).
    dotd = fopen(dotd_fname, "r");
data/distcc-3.3.3/src/dotd.c:105: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).
    tmp_dotd = fopen(*new_dotd_fname, "w");
data/distcc-3.3.3/src/dparent.c:299: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 (!(fp = fopen(arg_pid_file, "wt"))) {
data/distcc-3.3.3/src/dparent.c:373:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    i = open("/dev/tty", O_RDWR);
data/distcc-3.3.3/src/dparent.c:385:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        open("/dev/null", O_RDWR);
data/distcc-3.3.3/src/emaillog.c:73:20:  [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).
    email_fileno = open(email_fname, O_RDWR | O_TRUNC);
data/distcc-3.3.3/src/exec.c:142:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char cmdline[MAX_PATH+1]={0};
data/distcc-3.3.3/src/fix_debug_info.c:251:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(p, replace, replace_len);
data/distcc-3.3.3/src/fix_debug_info.c:268:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fd = open(path, O_RDWR);
data/distcc-3.3.3/src/gcc-id.c:90: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 version[64], machine[64];
data/distcc-3.3.3/src/h_compile.c:81:54:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            ret = dcc_fresh_dependency_exists((const char *)argv[2],
data/distcc-3.3.3/src/h_compile.c:82:54:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                                              (const char *)argv[3],
data/distcc-3.3.3/src/h_getline.c:40: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).
        n = atoi(argv[1]);
data/distcc-3.3.3/src/hosts.c:220:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        val = atoi(*psrc);
data/distcc-3.3.3/src/include_server_if.c:219: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 link_target[MAXPATHLEN + 1];
data/distcc-3.3.3/src/io.c:77:35:  [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 parsed_user_timeout = atoi(user_timeout);
data/distcc-3.3.3/src/io.c:213:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *) buf)[r];
data/distcc-3.3.3/src/io.c:247:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *) buf)[r];
data/distcc-3.3.3/src/loadfile.c:63: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 ((fd = open(filename, O_RDONLY)) == -1) {
data/distcc-3.3.3/src/lock.c:253: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).
    *plockfd = open(fname, O_WRONLY|O_CREAT, 0666);
data/distcc-3.3.3/src/lsdistcc.c:123: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 curhdrbuf[12];
data/distcc-3.3.3/src/lsdistcc.c:146: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 canned_query[1000];
data/distcc-3.3.3/src/lsdistcc.c:295:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char lzod_program[1000];
data/distcc-3.3.3/src/lsdistcc.c:296:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char lzo_work_mem[LZO1X_1_MEM_COMPRESS];
data/distcc-3.3.3/src/lsdistcc.c:339:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(canned_query + strlen(canned_query),
data/distcc-3.3.3/src/lsdistcc.c:366:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(canned_query + strlen(canned_query),
data/distcc-3.3.3/src/lsdistcc.c:499:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&sa.sin_addr, sp->res.addr, 4);
data/distcc-3.3.3/src/lsdistcc.c:601:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[1000];
data/distcc-3.3.3/src/lsdistcc.c:667:35:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                         unsigned char firstipaddr[4], int dnstimeout_usec,
data/distcc-3.3.3/src/lsdistcc.c:829:25:  [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(firstipaddr, result.addr, 4);
data/distcc-3.3.3/src/lsdistcc.c:916:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char firstipaddr[4];
data/distcc-3.3.3/src/lsdistcc.c:922: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 thename[256];
data/distcc-3.3.3/src/lsdistcc.c:1027:25:  [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).
            opt_match = atoi(argv[opti]+2);
data/distcc-3.3.3/src/lsdistcc.c:1032:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            opt_bigtimeout_sec = atoi(argv[opti]+2);
data/distcc-3.3.3/src/lsdistcc.c:1037:33:  [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).
            opt_dnstimeout_ms = atoi(argv[opti]+2);
data/distcc-3.3.3/src/lsdistcc.c:1042:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            opt_conntimeout_ms = atoi(argv[opti]+2);
data/distcc-3.3.3/src/lsdistcc.c:1047:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            opt_comptimeout_ms = atoi(argv[opti]+2);
data/distcc-3.3.3/src/lsdistcc.c:1052:27:  [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).
            opt_overlap = atoi(argv[opti]+2);
data/distcc-3.3.3/src/lsdistcc.c:1057:26:  [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).
            opt_dnsgap = atoi(argv[opti]+2);
data/distcc-3.3.3/src/lsdistcc.c:1062:28:  [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).
            opt_protocol = atoi(argv[opti]+2);
data/distcc-3.3.3/src/lsdistcc.c:1073:24:  [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).
            opt_port = atoi(argv[opti]+2);
data/distcc-3.3.3/src/mon-gnome.c:401: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 host[256];
data/distcc-3.3.3/src/mon-gnome.c:406:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy (host, "localhost");
data/distcc-3.3.3/src/mon-notify.c:105: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 ((fd = open (state_dir, O_RDONLY)) == -1) {
data/distcc-3.3.3/src/mon.c:270: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 ((fd = open(fullpath, O_RDONLY|O_BINARY, 0)) == -1) {
data/distcc-3.3.3/src/netutil.c:163: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 host[1024];
data/distcc-3.3.3/src/netutil.c:164: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 port[32];
data/distcc-3.3.3/src/pump.c:100: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 buf[262144];    /* we're not recursive */
data/distcc-3.3.3/src/rpc.c: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 buf[13];
data/distcc-3.3.3/src/rpc.c:79:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf, token, 4);
data/distcc-3.3.3/src/rpc.c:129: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 extrabuf[200];
data/distcc-3.3.3/src/rpc.c:133: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(extrabuf, buf, buflen);
data/distcc-3.3.3/src/rpc.c:167: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[13], *bum;
data/distcc-3.3.3/src/rpc.c:213: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[13], *bum;
data/distcc-3.3.3/src/rpc.c:221: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(token, buf, 4);
data/distcc-3.3.3/src/rslave.c:116:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(result.addr, h->h_addr_list[0], (unsigned) h->h_length);
data/distcc-3.3.3/src/rslave.h:45: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 hname[rslave_HOSTLEN+1];
data/distcc-3.3.3/src/rslave.h:52:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char addr[4];
data/distcc-3.3.3/src/safeguard.c:59:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        if (!(dcc_safeguard_level = atoi(env)))
data/distcc-3.3.3/src/serve.c:121:26:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    dcc_compile_log_fd = open(err_fname, O_WRONLY|O_CREAT|O_TRUNC, 0600);
data/distcc-3.3.3/src/serve.c:264:40:  [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).
                numFinalWordsToMatch = atoi(nw);
data/distcc-3.3.3/src/serve.c:313: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 linkbuf[MAXPATHLEN];
data/distcc-3.3.3/src/serve.c:397: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).
    int dirfd = open(LIBDIR "/distcc", O_RDONLY);
data/distcc-3.3.3/src/snprintf.c:507: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 convert[20];
data/distcc-3.3.3/src/snprintf.c:660: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 iconvert[311];
data/distcc-3.3.3/src/snprintf.c:661: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 fconvert[311];
data/distcc-3.3.3/src/snprintf.c:906: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 buf1[1024];
data/distcc-3.3.3/src/snprintf.c:907: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 buf2[1024];
data/distcc-3.3.3/src/snprintf.c:1026:13:  [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(buf2,                "%1.1f", r);
data/distcc-3.3.3/src/srvnet.c:122: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 portname[20];
data/distcc-3.3.3/src/srvrpc.c:108: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 token[5];
data/distcc-3.3.3/src/srvrpc.c:167:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[4 + sizeof(link_or_file_len)];
data/distcc-3.3.3/src/srvrpc.c:173:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(buf, token, 4);
data/distcc-3.3.3/src/srvrpc.c:175:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&buf[4], &link_or_file_len, sizeof(link_or_file_len));
data/distcc-3.3.3/src/ssh.c:197: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 *ssh_args[max_ssh_args];
data/distcc-3.3.3/src/ssh.c:198: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 *child_argv[11+max_ssh_args];
data/distcc-3.3.3/src/state.c:142:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(fname, O_CREAT|O_WRONLY|O_TRUNC|O_BINARY, 0666);
data/distcc-3.3.3/src/state.h:78: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 file[128];             /**< Input filename  */
data/distcc-3.3.3/src/state.h:79: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 host[128];             /**< Destination host description */
data/distcc-3.3.3/src/stats.c:61: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 longest_job_name[MAX_FILENAME_LEN];
data/distcc-3.3.3/src/stats.c:62: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 longest_job_compiler[MAX_FILENAME_LEN];
data/distcc-3.3.3/src/stats.c:81: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[MAX_FILENAME_LEN];
data/distcc-3.3.3/src/stats.c:82: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 compiler[MAX_FILENAME_LEN];
data/distcc-3.3.3/src/stats.c:85:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *stats_text[20] = { "TCP_ACCEPT", "REJ_BAD_REQ", "REJ_OVERLOAD",
data/distcc-3.3.3/src/stats.c:133:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&(sd.start), &start, sizeof(struct timeval));
data/distcc-3.3.3/src/stats.c:134:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&(sd.stop), &stop, sizeof(struct timeval));
data/distcc-3.3.3/src/stats.c:163:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(new_sd, sd, sizeof(struct statsdata));
data/distcc-3.3.3/src/stats.c:360: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 challenge[1024];
data/distcc-3.3.3/src/stats.c:361:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char reply[2048];
data/distcc-3.3.3/src/stats.c:411:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(dcc_stats.longest_job_name, "none");
data/distcc-3.3.3/src/stats.c:413:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(dcc_stats.longest_job_compiler, "none");
data/distcc-3.3.3/src/stats.h:36: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.
extern const char *stats_text[20];
data/distcc-3.3.3/src/stringmap.c: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 buf[2*PATH_MAX];
data/distcc-3.3.3/src/stringmap.c:55: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).
    fp = fopen(filename, "r");
data/distcc-3.3.3/src/stringmap.c:141: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).
    fp = fopen("stringmap_test.dat", "w");
data/distcc-3.3.3/src/stringmap.c:152: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).
    fp = fopen("stringmap_test.dat", "w");
data/distcc-3.3.3/src/stringmap.c:164: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).
    fp = fopen("stringmap_test.dat", "w");
data/distcc-3.3.3/src/tempfile.c:427: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).
        fd = open(s, O_WRONLY | O_CREAT | O_EXCL, 0600);
data/distcc-3.3.3/src/trace.c:254:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf+len, "[%d] ", (int) getpid());
data/distcc-3.3.3/src/trace.c:256:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
        strcat(buf+len, ": ");
data/distcc-3.3.3/src/trace.c:306: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[4090];
data/distcc-3.3.3/src/trace.c:322: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[4090];
data/distcc-3.3.3/src/trace.c:436: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 job_summary[4096*4];
data/distcc-3.3.3/src/traceenv.c:65: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).
        fd = open(logfile, O_WRONLY|O_APPEND|O_CREAT, 0666);
data/distcc-3.3.3/src/traceenv.c:79:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            (fd = atoi(logfd_name)) == 0) {
data/distcc-3.3.3/src/util.c:138: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).
    newfd = open(fname, mode, 0666);
data/distcc-3.3.3/src/util.c:155: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 myname[100] = "\0";
data/distcc-3.3.3/src/util.c:159:13:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            strcpy(myname, "UNKNOWN");
data/distcc-3.3.3/src/util.c:200: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 host_name[1024];
data/distcc-3.3.3/src/util.c:251:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static char host_name[1024];
data/distcc-3.3.3/src/util.c:349:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char linkbuf[MAXPATHLEN], *buf;
data/distcc-3.3.3/src/util.c:426: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 buf[MAXPATHLEN];
data/distcc-3.3.3/src/util.c:499: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).
  FILE *f = fopen("/proc/loadavg", "r");
data/distcc-3.3.3/src/util.c:624: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 RSS_name[1024];
data/distcc-3.3.3/src/util.c:625: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 statfile[1024];
data/distcc-3.3.3/src/util.c:627: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[1024];
data/distcc-3.3.3/src/util.c:654:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(statfile, "/proc/");
data/distcc-3.3.3/src/util.c:656:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
        strcat(statfile, "/stat");
data/distcc-3.3.3/src/util.c:658: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).
        f = fopen(statfile, "r");
data/distcc-3.3.3/src/util.c:705: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 dev[100];
data/distcc-3.3.3/src/util.c:706: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 tmp[1024];
data/distcc-3.3.3/src/util.c:711: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).
    f = fopen("/proc/diskstats", "r");
data/distcc-3.3.3/src/util.c:718: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).
        f = fopen("/proc/partitions", "r");
data/distcc-3.3.3/src/util.c:784: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(d, s, len);
data/distcc-3.3.3/src/where.c:145:18:  [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).
	pause_time_ms = atoi(pt);
data/distcc-3.3.3/src/zeroconf-reg.c:77: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 cpus[32], jobs[32], machine[64] = "cc_machine=", version[64] = "cc_version=", *m, *v;
data/distcc-3.3.3/src/zeroconf-reg.c:109:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char stype[128];
data/distcc-3.3.3/src/zeroconf-reg.c:231:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char service[256] = "distcc@";
data/distcc-3.3.3/src/zeroconf.c:163: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 t[256], a[AVAHI_ADDRESS_STR_MAX];
data/distcc-3.3.3/src/zeroconf.c:275:38:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                    if ((h->n_cpus = atoi(value)) <= 0)
data/distcc-3.3.3/src/zeroconf.c:290:38:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                    if ((h->n_jobs = atoi(value)) <= 0)
data/distcc-3.3.3/src/zeroconf.c:425: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 machine[64], version[64], stype[128];
data/distcc-3.3.3/src/zeroconf.c:441:20:  [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 ((lock_fd = open(lock_file, O_RDWR|O_CREAT, 0666)) < 0) {
data/distcc-3.3.3/src/zeroconf.c:452: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 ((d.fd = open(host_file, O_RDWR|O_CREAT, 0666)) < 0) {
data/distcc-3.3.3/src/zeroconf.c:583:20:  [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 ((lock_fd = open(lock_file, O_RDWR|O_CREAT, 0666)) < 0) {
data/distcc-3.3.3/src/zeroconf.c:618:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            fd = open("/dev/null", O_RDWR);
data/distcc-3.3.3/src/zeroconf.c:644:20:  [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 ((host_fd = open(host_file, O_RDONLY)) < 0) {
data/distcc-3.3.3/include_server/c_extensions/distcc_pump_c_extensions_module.c:350: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).
    result_str = PyUnicode_FromStringAndSize(res, strlen(res));
data/distcc-3.3.3/include_server/c_extensions/distcc_pump_c_extensions_module.c:356:44:  [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 PyUnicode_FromStringAndSize(in, strlen(in));
data/distcc-3.3.3/popt/findme.c:25: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).
    start = pathbuf = alloca(strlen(path) + 1);
data/distcc-3.3.3/popt/findme.c:26: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).
    buf = malloc(strlen(path) + strlen(argv0) + sizeof("/"));
data/distcc-3.3.3/popt/findme.c:26:33:  [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 = malloc(strlen(path) + strlen(argv0) + sizeof("/"));
data/distcc-3.3.3/popt/popt.c:189: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).
	char * t = malloc(strlen(name) + 1);
data/distcc-3.3.3/popt/popt.c:289: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).
    {	char *s  = malloc((longName ? strlen(longName) : 0) + 3);
data/distcc-3.3.3/popt/popt.c:383: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).
	char *s = alloca(strlen(con->execPath) + strlen(item->argv[0]) + sizeof("/"));
data/distcc-3.3.3/popt/popt.c:383:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	char *s = alloca(strlen(con->execPath) + strlen(item->argv[0]) + sizeof("/"));
data/distcc-3.3.3/popt/popt.c:567: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).
    size_t tn = strlen(s) + 1;
data/distcc-3.3.3/popt/popt.c:589: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).
	    alen = strlen(a);
data/distcc-3.3.3/popt/popt.c:593: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).
	    te = t + strlen(t);
data/distcc-3.3.3/popt/popt.c:603: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).
    t = realloc(t, strlen(t) + 1);	/* XXX memory leak, hard to plug */
data/distcc-3.3.3/popt/popt.c:741: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).
		strcpy(alloca(strlen(origOptString) + 1), origOptString);
data/distcc-3.3.3/popt/popt.c:962: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).
	{   char *s = malloc((opt->longName ? strlen(opt->longName) : 0) + 3);
data/distcc-3.3.3/popt/poptconfig.c:17: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).
    int nameLength = strlen(con->appName);
data/distcc-3.3.3/popt/poptconfig.c:118:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(fd, (char *)file, fileLength) != fileLength) {
data/distcc-3.3.3/popt/poptconfig.c:182: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).
	fn = alloca(strlen(home) + 20);
data/distcc-3.3.3/popt/popthelp.c:141: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).
    strcpy(le, defstr);	le += strlen(le);
data/distcc-3.3.3/popt/popthelp.c:166: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).
	    strcpy(le, "null");	le += strlen(le);
data/distcc-3.3.3/popt/popthelp.c:170:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(le, s, slen); le[slen] = '\0'; le += strlen(le);	
data/distcc-3.3.3/popt/popthelp.c:170: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).
	    strncpy(le, s, slen); le[slen] = '\0'; le += strlen(le);	
data/distcc-3.3.3/popt/popthelp.c:171:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (slen < strlen(s)) {
data/distcc-3.3.3/popt/popthelp.c:172: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).
		strcpy(le, "...");	le += strlen(le);
data/distcc-3.3.3/popt/popthelp.c:213:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (opt->longName)	nb += strlen(opt->longName);
data/distcc-3.3.3/popt/popthelp.c:214: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).
    if (argDescrip)	nb += strlen(argDescrip);
data/distcc-3.3.3/popt/popthelp.c:235: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).
	char * le = left + strlen(left);
data/distcc-3.3.3/popt/popthelp.c:245: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).
		char * t = malloc((help ? strlen(help) : 0) +
data/distcc-3.3.3/popt/popthelp.c:246:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				strlen(defs) + sizeof(" "));
data/distcc-3.3.3/popt/popthelp.c:251: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).
			strcpy(te, help);	te += strlen(te);
data/distcc-3.3.3/popt/popthelp.c:304: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).
		strcpy(le, argDescrip);		le += strlen(le);
data/distcc-3.3.3/popt/popthelp.c:311: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).
	    strcpy(le, argDescrip);		le += strlen(le);
data/distcc-3.3.3/popt/popthelp.c:331: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).
    helpLength = strlen(help);
data/distcc-3.3.3/popt/popthelp.c:349: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).
	helpLength = strlen(help);
data/distcc-3.3.3/popt/popthelp.c:387: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(opt->longName);
data/distcc-3.3.3/popt/popthelp.c:392: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).
		len += sizeof("=")-1 + strlen(s);
data/distcc-3.3.3/popt/popthelp.c:496: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(fn) + 1;
data/distcc-3.3.3/popt/popthelp.c:536: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(opt->longName);
data/distcc-3.3.3/popt/popthelp.c:542: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(opt->longName);
data/distcc-3.3.3/popt/popthelp.c:550: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(argDescrip) + 1;
data/distcc-3.3.3/popt/popthelp.c:696: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).
	    str[strlen(str)] = opt->shortName;
data/distcc-3.3.3/popt/popthelp.c:707: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).
    return strlen(s) + 4;
data/distcc-3.3.3/popt/popthelp.c:730: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).
	cursor += strlen(con->otherHelp) + 1;
data/distcc-3.3.3/popt/poptparse.c:27: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).
	nb += strlen(argv[i]) + 1;
data/distcc-3.3.3/popt/poptparse.c:39: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).
	dst += strlen(strcpy(dst, argv[i])) + 1;
data/distcc-3.3.3/popt/poptparse.c:64: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 buflen = strlen(s) + 1;
data/distcc-3.3.3/popt/poptparse.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).
    if (strlen(argv[argc])) {
data/distcc-3.3.3/popt/poptparse.c:163: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).
	linelen = strlen(p);
data/distcc-3.3.3/popt/poptparse.c:222:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat(argstr, "\"");
data/distcc-3.3.3/popt/system.h:70: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).
#define xstrdup(_str)   (strcpy((malloc(strlen(_str)+1) ? : vmefail()), (_str)))
data/distcc-3.3.3/src/access.c:78:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(host_str, spec, value_len);
data/distcc-3.3.3/src/arg.c:433:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *comma = dash_Wp_option + strlen("-Wp");
data/distcc-3.3.3/src/arg.c:460:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *comma = dash_Wp_option + strlen("-Wp");
data/distcc-3.3.3/src/argutil.c:140: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).
        l += strlen(a[i]) + 3;  /* two quotes and space */
data/distcc-3.3.3/src/argutil.c:159: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).
        ss += strlen(a[i]);
data/distcc-3.3.3/src/auth_distcc.c:182: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).
    name_buffer.length = strlen(ext_princ_name);
data/distcc-3.3.3/src/auth_distccd.c:227:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((*principal = malloc(strlen((char *) name_buffer.value) + 1 )) == NULL) {
data/distcc-3.3.3/src/auth_distccd.c:229: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).
                                        (long) (strlen((char *) name_buffer.value) + 1));
data/distcc-3.3.3/src/auth_distccd.c:412: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).
    name_buffer.length = strlen(princ_env_val);
data/distcc-3.3.3/src/auth_distccd.c:416: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).
    name_buffer.length = strlen(name_buffer.value);
data/distcc-3.3.3/src/auth_distccd.c:499:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t read;
data/distcc-3.3.3/src/auth_distccd.c:544: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).
	    if ((*list = malloc(strlen(line) + 1)) == NULL) {
data/distcc-3.3.3/src/auth_distccd.c:546:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                            (long) (strlen(line) + 1));
data/distcc-3.3.3/src/climasq.c:69: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 (!(buf = malloc(strlen(envpath)+1+strlen(progname)+1))) {
data/distcc-3.3.3/src/climasq.c:69: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 (!(buf = malloc(strlen(envpath)+1+strlen(progname)+1))) {
data/distcc-3.3.3/src/climasq.c:78: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).
        findlen = strlen(findpath);
data/distcc-3.3.3/src/climasq.c:90: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).
            len = strlen(p);
data/distcc-3.3.3/src/climasq.c:108:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buf, p, (size_t) len);
data/distcc-3.3.3/src/compile.c:115: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).
        int delta = strlen(discrepancy_suffix) -
data/distcc-3.3.3/src/compile.c:116: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).
            strlen(include_server_port_suffix);
data/distcc-3.3.3/src/compile.c:118: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).
        *filename = malloc(strlen(include_server_port) + 1 + delta);
data/distcc-3.3.3/src/compile.c:124: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).
        int slash_pos = strlen(include_server_port)
data/distcc-3.3.3/src/compile.c:125: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).
                        - strlen(include_server_port_suffix);
data/distcc-3.3.3/src/compile.c:297:17:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((c = getc(fp)) != EOF && c != ':');
data/distcc-3.3.3/src/compile.c:305:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((c = getc(fp)) != EOF && (isspace(c) || c == '\\'));
data/distcc-3.3.3/src/compile.c:308:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((c = getc(fp)) != EOF &&
data/distcc-3.3.3/src/compile.c:317:26:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                if ((c = getc(fp)) != EOF)
data/distcc-3.3.3/src/compile.c:338: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).
                    *result = realloc(dep_name, strlen(dep_name) + 1);
data/distcc-3.3.3/src/compile.c:539:69:  [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 (strcmp(argv[0], "clang") == 0 || strncmp(argv[0], "clang-", strlen("clang-")) == 0 ||
data/distcc-3.3.3/src/compile.c:540:73:  [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).
        strcmp(argv[0], "clang++") == 0 || strncmp(argv[0], "clang++-", strlen("clang++-")) == 0)
data/distcc-3.3.3/src/compile.c:564: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).
    if (strcmp(argv[0], "gcc") == 0 || strncmp(argv[0], "gcc-", strlen("gcc-")) == 0 ||
data/distcc-3.3.3/src/compile.c:565: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).
        strcmp(argv[0], "g++") == 0 || strncmp(argv[0], "g++-", strlen("g++-")) == 0)
data/distcc-3.3.3/src/compile.c:571: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).
    newcmd = malloc(strlen(target_with_vendor) + 1 + strlen(argv[0] + 1));
data/distcc-3.3.3/src/compile.c:571:54:  [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).
    newcmd = malloc(strlen(target_with_vendor) + 1 + strlen(argv[0] + 1));
data/distcc-3.3.3/src/compile.c:577: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).
        strcat(newcmd, t + strlen("-pc"));
data/distcc-3.3.3/src/compile.c:582:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(newcmd, "-");
data/distcc-3.3.3/src/compile.c:588: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).
        char binname[strlen(path) + 1 + strlen(newcmd) + 1];
data/distcc-3.3.3/src/compile.c:588: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).
        char binname[strlen(path) + 1 + strlen(newcmd) + 1];
data/distcc-3.3.3/src/compile.c:594: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 = path + strlen(path);
data/distcc-3.3.3/src/compile.c:598:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(binname, path, pathlen);
data/distcc-3.3.3/src/compile.c:600:9:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
        strcat(binname, "/");
data/distcc-3.3.3/src/dotd.c:56: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).
    needle_len = strlen(needle);
data/distcc-3.3.3/src/dotd.c:57: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).
    new_needle_len = strlen(new_needle);
data/distcc-3.3.3/src/dotd.c:59:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(haystack) - needle_len + new_needle_len + 1 > hay_size)
data/distcc-3.3.3/src/dotd.c:65: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).
            strlen(found + needle_len) + 1);
data/distcc-3.3.3/src/dotd.c:130: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).
            char *rest_of_buf = found + strlen(root_dir);
data/distcc-3.3.3/src/dotd.c:131: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).
            memmove(found, rest_of_buf, strlen(rest_of_buf) + 1);
data/distcc-3.3.3/src/dotd.c:273:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          if (tmp_dotd_fname[strlen(tmp_dotd_fname) - 1] == '.')
data/distcc-3.3.3/src/emaillog.c:95:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  ret = write(email_fileno, begin, strlen(begin));
data/distcc-3.3.3/src/emaillog.c:96: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 (ret != (ssize_t) strlen(begin)) return EXIT_IO_ERROR;
data/distcc-3.3.3/src/emaillog.c:98: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).
  ret = write(email_fileno, description, strlen(description));
data/distcc-3.3.3/src/emaillog.c:99: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 (ret != (ssize_t) strlen(description)) return EXIT_IO_ERROR;
data/distcc-3.3.3/src/emaillog.c:107: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).
  ret = write(email_fileno, end, strlen(end));
data/distcc-3.3.3/src/emaillog.c:108: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 (ret != (ssize_t) strlen(end)) return EXIT_IO_ERROR;
data/distcc-3.3.3/src/emaillog.c:110: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).
  ret = write(email_fileno, description, strlen(description));
data/distcc-3.3.3/src/emaillog.c:111: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 (ret != (ssize_t) strlen(description)) return EXIT_IO_ERROR;
data/distcc-3.3.3/src/exec.c:205:9:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
        strcat(cmdline, " ");
data/distcc-3.3.3/src/exec.c:517:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                int nread = read(in_fd, &buf, 1);
data/distcc-3.3.3/src/filename.c:144:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(dot) < strlen(new_ext)) {
data/distcc-3.3.3/src/filename.c:144:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(dot) < strlen(new_ext)) {
data/distcc-3.3.3/src/filename.c:331:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(sfile) < 3) {
data/distcc-3.3.3/src/fix_debug_info.c:242: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).
  size_t search_len = strlen(search);
data/distcc-3.3.3/src/fix_debug_info.c:243:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t replace_len = strlen(replace);
data/distcc-3.3.3/src/fix_debug_info.c:301:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read(fd, base, st->st_size) != st->st_size) {
data/distcc-3.3.3/src/fix_debug_info.c:436: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).
  size_t client_path_len = strlen(client_path);
data/distcc-3.3.3/src/fix_debug_info.c:437: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).
  size_t server_path_len = strlen(server_path);
data/distcc-3.3.3/src/gcc-id.c:92:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(version, v, sizeof(version)-1);
data/distcc-3.3.3/src/gcc-id.c:94:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(machine, m, sizeof(machine)-1);
data/distcc-3.3.3/src/h_getline.c:60:17:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((c = getchar()) != EOF)
data/distcc-3.3.3/src/hosts.c:143:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(dst, src, size);
data/distcc-3.3.3/src/hosts.c:405: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).
    const char *token = token_start + strlen("localhost");
data/distcc-3.3.3/src/include_server_if.c:87:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(include_server_port) >= ((int)sizeof(sa.sun_path) - 1)) {
data/distcc-3.3.3/src/include_server_if.c:236: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).
        filename[strlen(filename) - strlen("/forcing_technique_271828")]
data/distcc-3.3.3/src/include_server_if.c:236: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).
        filename[strlen(filename) - strlen("/forcing_technique_271828")]
data/distcc-3.3.3/src/io.c:197:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        r = read(fd, buf, len);
data/distcc-3.3.3/src/loadfile.c:95:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((read_bytes = read(fd, buf, (size_t) sb.st_size)) == -1) {
data/distcc-3.3.3/src/lsdistcc.c:299:54:  [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).
    lzo1x_1_compress((const unsigned char *)program, strlen(program),
data/distcc-3.3.3/src/lsdistcc.c:316: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).
                 (unsigned)strlen(opt_compiler), opt_compiler,
data/distcc-3.3.3/src/lsdistcc.c:317: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).
                 (unsigned)strlen(program), program);
data/distcc-3.3.3/src/lsdistcc.c:318: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).
        canned_query_len = strlen(canned_query);
data/distcc-3.3.3/src/lsdistcc.c:334: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).
                 (unsigned)strlen(opt_compiler),
data/distcc-3.3.3/src/lsdistcc.c:338: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).
        canned_query_len = strlen(canned_query) + lzod_program_len;
data/distcc-3.3.3/src/lsdistcc.c:339: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).
        memcpy(canned_query + strlen(canned_query),
data/distcc-3.3.3/src/lsdistcc.c:361: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).
                 (unsigned)strlen(opt_compiler),
data/distcc-3.3.3/src/lsdistcc.c:365: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).
        canned_query_len = strlen(canned_query) + lzod_program_len;
data/distcc-3.3.3/src/lsdistcc.c:366: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).
        memcpy(canned_query + strlen(canned_query),
data/distcc-3.3.3/src/lsdistcc.c:379:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    nread = read(sp->fd, sp->curhdrbuf + sp->curhdrlen,
data/distcc-3.3.3/src/lsdistcc.c:603:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            nread = read(sp->fd, buf, sizeof(buf));
data/distcc-3.3.3/src/lsdistcc.c:890:9:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
        strcat(thename, ".");
data/distcc-3.3.3/src/mon-text.c:109:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(delay * 1000000);
data/distcc-3.3.3/src/mon.c:121:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    nread = read(fd, lp, sizeof *lp);
data/distcc-3.3.3/src/pump.c:107:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        r_in = read(ifd, buf, (size_t) wanted);
data/distcc-3.3.3/src/rpc.c:75:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(token) != 4) {
data/distcc-3.3.3/src/rpc.c:136:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ret = read(ifd, extrabuf + buflen, sizeof extrabuf - 1 - buflen);
data/distcc-3.3.3/src/rpc.c:170:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(expected) != 4) {
data/distcc-3.3.3/src/rpc.c:280: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(buf);
data/distcc-3.3.3/src/rslave.c:64:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buf->hname, hostname, rslave_HOSTLEN);
data/distcc-3.3.3/src/rslave.c:84:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(rslave->pipeToSlaves[0], req, sizeof(*req)) != sizeof(*req))
data/distcc-3.3.3/src/rslave.c:98:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(rslave->pipeFromSlaves[0], result, sizeof(*result)) != sizeof(*result))
data/distcc-3.3.3/src/serve.c:328: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).
            len = strlen(p);
data/distcc-3.3.3/src/serve.c:381: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).
        size_t len = strlen(creator_paths[i]);
data/distcc-3.3.3/src/serve.c:509:52:  [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).
                    index_of_first_filename_char = strlen(include_option);
data/distcc-3.3.3/src/serve.c:771: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).
        if (strncmp(a, "-fplugin=", strlen("-fplugin=")) == 0 ||
data/distcc-3.3.3/src/serve.c:772: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).
            strncmp(a, "-specs=", strlen("-specs=")) == 0) {
data/distcc-3.3.3/src/snprintf.c:401: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).
                    max = strlen(const_strvalue);
data/distcc-3.3.3/src/stats.c:136:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(sd.filename, filename, MAX_FILENAME_LEN - 1);
data/distcc-3.3.3/src/stats.c:137:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(sd.compiler, compiler, MAX_FILENAME_LEN - 1);
data/distcc-3.3.3/src/stats.c:155:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(dcc_stats.longest_job_name, sd->filename,
data/distcc-3.3.3/src/stats.c:157:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(dcc_stats.longest_job_compiler, sd->compiler,
data/distcc-3.3.3/src/stats.c:442:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ret = read(acc_fd, challenge, 1024); /* empty the receive queue */
data/distcc-3.3.3/src/stats.c:532:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                if (read(dcc_statspipe[0], &sd, sizeof(sd)) != -1) {
data/distcc-3.3.3/src/stringmap.c:71: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).
        int len = strlen(buf);
data/distcc-3.3.3/src/stringmap.c:98: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(string);
data/distcc-3.3.3/src/tempfile.c:192: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).
    for (f = 0, ln = strlen(s); f != ln; f++)
data/distcc-3.3.3/src/tempfile.c:195: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 (f = strlen(s)-1; f > 0 && s[f] == '/'; f--)
data/distcc-3.3.3/src/trace.c:249:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(buf);
data/distcc-3.3.3/src/trace.c:258: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(buf);
data/distcc-3.3.3/src/trace.c:262:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(buf);
data/distcc-3.3.3/src/trace.c:268:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(buf);
data/distcc-3.3.3/src/trace.c:328: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(buf);
data/distcc-3.3.3/src/trace.c:331:5:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
    strcpy(&buf[len], "\n");
data/distcc-3.3.3/src/trace.c:447:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int64_t len = (4096 * 4 - 1) - strlen(job_summary);
data/distcc-3.3.3/src/trace.c:449:9:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
        strncat(job_summary, s, len);
data/distcc-3.3.3/src/util.c:94: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).
    size_t len_tail = strlen(tail);
data/distcc-3.3.3/src/util.c:95:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len_tiger = strlen(tiger);
data/distcc-3.3.3/src/util.c:106:33:  [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 !strncmp(head, worm, strlen(head));
data/distcc-3.3.3/src/util.c:215:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(host_name, h->h_name, sizeof(host_name) - 1);
data/distcc-3.3.3/src/util.c:246:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (envh2 && (!envh || (strlen(envh) < strlen(envh2))))
data/distcc-3.3.3/src/util.c:246:44:  [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 (envh2 && (!envh || (strlen(envh) < strlen(envh2))))
data/distcc-3.3.3/src/util.c:268:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(host_name, h->h_name, sizeof(host_name) - 1);
data/distcc-3.3.3/src/util.c:363: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 (!(buf = malloc(strlen(envpath)+1+strlen(compiler_name)+1))) {
data/distcc-3.3.3/src/util.c:363: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 (!(buf = malloc(strlen(envpath)+1+strlen(compiler_name)+1))) {
data/distcc-3.3.3/src/util.c:373: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).
            len = strlen(p);
data/distcc-3.3.3/src/util.c:376:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, p, len);
data/distcc-3.3.3/src/util.c:445:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(buf);
data/distcc-3.3.3/src/util.c:452: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).
        path_len = strlen(path);
data/distcc-3.3.3/src/util.c:461:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buf + len, path, path_len);
data/distcc-3.3.3/src/util.c:563:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(*pdst, *psrc, len);
data/distcc-3.3.3/src/util.c:597: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 = path + strlen(path);
data/distcc-3.3.3/src/util.c:598:44:  [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).
        _loc = realloc(loc, t - path + 1 + strlen(command) + 1);
data/distcc-3.3.3/src/util.c:604:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(loc, path, t - path);
data/distcc-3.3.3/src/util.c:606:9:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
        strcat(loc, "/");
data/distcc-3.3.3/src/util.c:674: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).
        l = strlen(RSS_name);
data/distcc-3.3.3/src/util.c:682:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(RSS_name, name, 1024);
data/distcc-3.3.3/src/util.c:780:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len = strlen(s);
data/distcc-3.3.3/src/util.c:903:18:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if ((c = fgetc(stream)) == EOF)
data/distcc-3.3.3/src/where.c:154:2:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	usleep(pause_time_ms * 1000);
data/distcc-3.3.3/src/zeroconf.c:173: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).
        if (dcc_writex(d->fd, t, strlen(t)) != 0) {
data/distcc-3.3.3/src/zeroconf.c:482:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(stype, DCC_DNS_SERVICE_TYPE, sizeof(stype));
data/distcc-3.3.3/src/zeroconf.c:574: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).
    lock_file = malloc(strlen(dir) + sizeof("/lock"));
data/distcc-3.3.3/src/zeroconf.c:578: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).
    host_file = malloc(strlen(dir) + sizeof("/hosts"));
data/distcc-3.3.3/src/zeroconf.c:640:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(1000000);         /* 1000 ms */

ANALYSIS SUMMARY:

Hits = 563
Lines analyzed = 41399 in approximately 1.14 seconds (36444 lines/second)
Physical Source Lines of Code (SLOC) = 27825
Hits@level = [0] 143 [1] 202 [2] 207 [3]  53 [4]  98 [5]   3
Hits@level+ = [0+] 706 [1+] 563 [2+] 361 [3+] 154 [4+] 101 [5+]   3
Hits/KSLOC@level+ = [0+] 25.3729 [1+] 20.2336 [2+] 12.9739 [3+] 5.53459 [4+] 3.62983 [5+] 0.107817
Symlinks skipped = 9 (--allowlink overrides but see doc for security issue)
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.