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/liece-2.0+0.20030527cvs/dcc/getopt.c
Examining data/liece-2.0+0.20030527cvs/dcc/dcc.c
Examining data/liece-2.0+0.20030527cvs/dcc/getopt.h
Examining data/liece-2.0+0.20030527cvs/dcc/getopt1.c
Examining data/liece-2.0+0.20030527cvs/dcc/tcp.c
Examining data/liece-2.0+0.20030527cvs/dcc/basename.c

FINAL RESULTS:

data/liece-2.0+0.20030527cvs/dcc/dcc.c:408:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long (argc, argv, "vh", long_options, &option_index);
data/liece-2.0+0.20030527cvs/dcc/getopt.c:177:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
char *getenv ();
data/liece-2.0+0.20030527cvs/dcc/getopt.c:295: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.
  posixly_correct = getenv ("POSIXLY_CORRECT");
data/liece-2.0+0.20030527cvs/dcc/getopt.c:672:1:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
getopt (argc, argv, optstring)
data/liece-2.0+0.20030527cvs/dcc/getopt.c:702:11:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
      c = getopt (argc, argv, "abc:d:0123456789");
data/liece-2.0+0.20030527cvs/dcc/getopt.h:98:12:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
extern int getopt (int argc, char *const *argv, const char *shortopts);
data/liece-2.0+0.20030527cvs/dcc/getopt.h:100:12:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
extern int getopt ();
data/liece-2.0+0.20030527cvs/dcc/getopt.h:102:12:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
data/liece-2.0+0.20030527cvs/dcc/getopt.h:114:12:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
extern int getopt ();
data/liece-2.0+0.20030527cvs/dcc/getopt.h:115:12:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
extern int getopt_long ();
data/liece-2.0+0.20030527cvs/dcc/getopt1.c:54:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
char *getenv ();
data/liece-2.0+0.20030527cvs/dcc/getopt1.c:62:1:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
getopt_long (argc, argv, options, long_options, opt_index)
data/liece-2.0+0.20030527cvs/dcc/getopt1.c:118:11:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
      c = getopt_long (argc, argv, "abc:d:0123456789",
data/liece-2.0+0.20030527cvs/dcc/tcp.c:106:11:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
      c = getopt_long (argc, argv, "vh", long_options, &option_index);
data/liece-2.0+0.20030527cvs/dcc/dcc.c:54:25:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
# define memmove(x,y,z) bcopy((y), (x), (z))
data/liece-2.0+0.20030527cvs/dcc/dcc.c:176:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[ BUFSIZ * 8 ];
data/liece-2.0+0.20030527cvs/dcc/dcc.c:179: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 namebuf[ MAXHOSTNAMELEN ];
data/liece-2.0+0.20030527cvs/dcc/dcc.c:183:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((ifd = open (ifile, O_RDONLY)) < 0) { 
data/liece-2.0+0.20030527cvs/dcc/dcc.c:230:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[ BUFSIZ * 8 ];
data/liece-2.0+0.20030527cvs/dcc/dcc.c:234:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((ofd = open(ifile, O_WRONLY|O_CREAT|O_TRUNC, 0600)) < 0) {
data/liece-2.0+0.20030527cvs/dcc/dcc.c:270:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[ BUFSIZ * 8 ];
data/liece-2.0+0.20030527cvs/dcc/dcc.c:354: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 namebuf[ MAXHOSTNAMELEN ];
data/liece-2.0+0.20030527cvs/dcc/dcc.c:397:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  progname = (char *)basename(argv[ 0 ]);
data/liece-2.0+0.20030527cvs/dcc/dcc.c:455: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).
    status = send_file (atoi(argv[ 2 ]), argv[ 3 ]);
data/liece-2.0+0.20030527cvs/dcc/dcc.c:463:7:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		    atoi(argv[ 3 ]), atoi(argv[ 4 ]), argv[ 5 ]);
data/liece-2.0+0.20030527cvs/dcc/dcc.c:463: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).
		    atoi(argv[ 3 ]), atoi(argv[ 4 ]), argv[ 5 ]);
data/liece-2.0+0.20030527cvs/dcc/dcc.c:471: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).
	status = chat_listen(atoi(argv[ 3 ]));
data/liece-2.0+0.20030527cvs/dcc/dcc.c:478:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			      atoi(argv[ 4 ]));
data/liece-2.0+0.20030527cvs/dcc/tcp.c:89:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[1024], *retry;
data/liece-2.0+0.20030527cvs/dcc/tcp.c:93:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  progname = (char *) basename (argv[0]);
data/liece-2.0+0.20030527cvs/dcc/tcp.c:162:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy (&sin.sin_addr, host->h_addr, host->h_length);
data/liece-2.0+0.20030527cvs/dcc/tcp.c:167: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).
    sin.sin_port = htons (atoi (service));
data/liece-2.0+0.20030527cvs/dcc/dcc.c:209:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while ((len = read (ifd, buf, sizeof (buf))) > 0) {
data/liece-2.0+0.20030527cvs/dcc/dcc.c:212:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((len = read (ofd, buf, sizeof (u_long))) &&
data/liece-2.0+0.20030527cvs/dcc/dcc.c:241:41:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while (bytesreceived < size && (len = read (ifd, buf, toread)) > 0) {
data/liece-2.0+0.20030527cvs/dcc/dcc.c:284:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if ((len = read(sfd, buf, sizeof (buf))) == 0) {
data/liece-2.0+0.20030527cvs/dcc/dcc.c:292:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if ((len = read (0, buf, sizeof (buf))) == 0) {
data/liece-2.0+0.20030527cvs/dcc/getopt.c:201: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).
extern int strlen (const char *);
data/liece-2.0+0.20030527cvs/dcc/getopt.c:493:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if (nameend - nextchar == (int) strlen (p->name))
data/liece-2.0+0.20030527cvs/dcc/getopt.c:517:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  nextchar += strlen (nextchar);
data/liece-2.0+0.20030527cvs/dcc/getopt.c:547: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).
		  nextchar += strlen (nextchar);
data/liece-2.0+0.20030527cvs/dcc/getopt.c:560: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).
		  nextchar += strlen (nextchar);
data/liece-2.0+0.20030527cvs/dcc/getopt.c:564:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  nextchar += strlen (nextchar);
data/liece-2.0+0.20030527cvs/dcc/tcp.c:212:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  nbuffer = read (emacsIn, buffer, sizeof buffer -1);
data/liece-2.0+0.20030527cvs/dcc/tcp.c:231:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  nbuffer = read (server, buffer, sizeof buffer -1);

ANALYSIS SUMMARY:

Hits = 45
Lines analyzed = 1856 in approximately 0.08 seconds (24050 lines/second)
Physical Source Lines of Code (SLOC) = 1180
Hits@level = [0]  45 [1]  13 [2]  18 [3]  14 [4]   0 [5]   0
Hits@level+ = [0+]  90 [1+]  45 [2+]  32 [3+]  14 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 76.2712 [1+] 38.1356 [2+] 27.1186 [3+] 11.8644 [4+]   0 [5+]   0
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.