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/traceroute-2.1.0/libsupp/clif.h
Examining data/traceroute-2.1.0/libsupp/clif.c
Examining data/traceroute-2.1.0/traceroute/module.c
Examining data/traceroute-2.1.0/traceroute/mod-tcpconn.c
Examining data/traceroute-2.1.0/traceroute/mod-raw.c
Examining data/traceroute-2.1.0/traceroute/poll.c
Examining data/traceroute-2.1.0/traceroute/random.c
Examining data/traceroute-2.1.0/traceroute/extension.c
Examining data/traceroute-2.1.0/traceroute/flowlabel.h
Examining data/traceroute-2.1.0/traceroute/as_lookups.c
Examining data/traceroute-2.1.0/traceroute/mod-udp.c
Examining data/traceroute-2.1.0/traceroute/csum.c
Examining data/traceroute-2.1.0/traceroute/traceroute.h
Examining data/traceroute-2.1.0/traceroute/mod-tcp.c
Examining data/traceroute-2.1.0/traceroute/mod-dccp.c
Examining data/traceroute-2.1.0/traceroute/mod-icmp.c
Examining data/traceroute-2.1.0/traceroute/traceroute.c
Examining data/traceroute-2.1.0/traceroute/time.c
Examining data/traceroute-2.1.0/include/version.h

FINAL RESULTS:

data/traceroute-2.1.0/libsupp/clif.c:47:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf (stderr, format, ap);
data/traceroute-2.1.0/libsupp/clif.c:71:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy (p, SHORT_PLUS_MINUS);
data/traceroute-2.1.0/libsupp/clif.c:116: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 (p, LONG_PLUS_MINUS);
data/traceroute-2.1.0/libsupp/clif.c:125: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 (p, SHORT_PLUS_MINUS);
data/traceroute-2.1.0/libsupp/clif.c:183:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		    strcpy (p, EXCL_DLM);
data/traceroute-2.1.0/libsupp/clif.c:883:13:  [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.
		    len = fprintf (stderr, OPT_START_DLM "%s"
data/traceroute-2.1.0/libsupp/clif.c:887:13:  [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.
		    len = fprintf (stderr, OPT_START_DLM "%s",
data/traceroute-2.1.0/libsupp/clif.c:890:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		len = fprintf (stderr, OPT_START_DLM "%s", show_long (optn));
data/traceroute-2.1.0/libsupp/clif.c:935:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		len = fprintf (stderr, ARG_MARK_STRICT "%s", argm->name);
data/traceroute-2.1.0/libsupp/clif.c:937:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		len = fprintf (stderr, ARG_MARK_OPT "%s ...", argm->name);
data/traceroute-2.1.0/libsupp/clif.c:939:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		len = fprintf (stderr, ARG_MARK_GROUP "%s", argm->name);
data/traceroute-2.1.0/libsupp/clif.c:941:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		len = fprintf (stderr, ARG_MARK_GROUP0 "%s", argm->name);
data/traceroute-2.1.0/libsupp/clif.c:943:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		len = fprintf (stderr, ARG_MARK_OPT "%s", argm->name);
data/traceroute-2.1.0/traceroute/extension.c:35:14:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	    CURR += snprintf (CURR, END - CURR, (FMT), ## ARGS);\
data/traceroute-2.1.0/traceroute/mod-tcp.c:173: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 (buf, SYSCTL_PREFIX);
data/traceroute-2.1.0/traceroute/mod-tcp.c:174: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 (buf, name);
data/traceroute-2.1.0/traceroute/traceroute.c:146:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf (stderr, format, ap);
data/traceroute-2.1.0/libsupp/clif.c:401:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	int posix = getenv ("POSIXLY_CORRECT") != NULL ||
data/traceroute-2.1.0/traceroute/as_lookups.c:42: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.
	    server = getenv ("RA_SERVER");
data/traceroute-2.1.0/traceroute/as_lookups.c:45: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.
	    service = getenv ("RA_SERVICE");
data/traceroute-2.1.0/traceroute/random.c:19:2:  [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 (times (NULL) + getpid ());
data/traceroute-2.1.0/libsupp/clif.c:64:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[80];
data/traceroute-2.1.0/libsupp/clif.c:90: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 (p, ",...");
data/traceroute-2.1.0/libsupp/clif.c:103:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[80];
data/traceroute-2.1.0/libsupp/clif.c:151: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 (p, ",...");
data/traceroute-2.1.0/libsupp/clif.c:164:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[256];
data/traceroute-2.1.0/libsupp/clif.c:225: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 ss[80];
data/traceroute-2.1.0/libsupp/clif.c:360:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char tmp[80];
data/traceroute-2.1.0/libsupp/clif.c:780:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024];
data/traceroute-2.1.0/libsupp/clif.c:781: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 spacer[128];	/*  assume it is enough   */
data/traceroute-2.1.0/libsupp/clif.c:979:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char m_buf[256], p_buf[256], mp_buf[256];
data/traceroute-2.1.0/traceroute/as_lookups.c:26: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 ra_buf[512] = { 0, };
data/traceroute-2.1.0/traceroute/as_lookups.c:32:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024];
data/traceroute-2.1.0/traceroute/as_lookups.c:56: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 (&ra_addr, res->ai_addr, res->ai_addrlen);
data/traceroute-2.1.0/traceroute/extension.c:42: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 str[1024];
data/traceroute-2.1.0/traceroute/mod-dccp.c:108: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 (ptr, &src.sin.sin_addr, len);
data/traceroute-2.1.0/traceroute/mod-dccp.c:110: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 (ptr, &dest_addr.sin.sin_addr, len);
data/traceroute-2.1.0/traceroute/mod-dccp.c:114: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 (ptr, &src.sin6.sin6_addr, len);
data/traceroute-2.1.0/traceroute/mod-dccp.c:116: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 (ptr, &dest_addr.sin6.sin6_addr, len);
data/traceroute-2.1.0/traceroute/mod-tcp.c:80:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char str[64];	/*  enough...  */
data/traceroute-2.1.0/traceroute/mod-tcp.c:170:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[sizeof (SYSCTL_PREFIX) + strlen (name) + 1];
data/traceroute-2.1.0/traceroute/mod-tcp.c:176:7:  [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 (buf, O_RDONLY, 0);
data/traceroute-2.1.0/traceroute/mod-tcp.c:281: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 (ptr, &src.sin.sin_addr, len);
data/traceroute-2.1.0/traceroute/mod-tcp.c:283: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 (ptr, &dest_addr.sin.sin_addr, len);
data/traceroute-2.1.0/traceroute/mod-tcp.c:287: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 (ptr, &src.sin6.sin6_addr, len);
data/traceroute-2.1.0/traceroute/mod-tcp.c:289: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 (ptr, &dest_addr.sin6.sin6_addr, len);
data/traceroute-2.1.0/traceroute/traceroute.c:132: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 *opts[16] = { NULL, };	/*  assume enough   */
data/traceroute-2.1.0/traceroute/traceroute.c:222: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 (addr, ai->ai_addr, ai->ai_addrlen);
data/traceroute-2.1.0/traceroute/traceroute.c:239: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).
	nfd = open ("/dev/null", O_RDONLY);
data/traceroute-2.1.0/traceroute/traceroute.c:251: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 addr2str_buf[INET6_ADDRSTRLEN];
data/traceroute-2.1.0/traceroute/traceroute.c:317: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 (&in[i], &gates[i].sin.sin_addr, sizeof (*in));
data/traceroute-2.1.0/traceroute/traceroute.c:319: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 (&in[i], &dst_addr.sin.sin_addr, sizeof (*in));
data/traceroute-2.1.0/traceroute/traceroute.c:347: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 (&in6[i], &gates[i].sin6.sin6_addr, sizeof (*in6));
data/traceroute-2.1.0/traceroute/traceroute.c:438:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024];
data/traceroute-2.1.0/traceroute/traceroute.c:731:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char buf[1024];
data/traceroute-2.1.0/traceroute/traceroute.c:1221:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[sizeof (pb->err_str)];
data/traceroute-2.1.0/traceroute/traceroute.c:1375:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1280];		/*  min mtu for ipv6 ( >= 576 for ipv4)  */
data/traceroute-2.1.0/traceroute/traceroute.c:1377: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 control[1024];
data/traceroute-2.1.0/traceroute/traceroute.h:31: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 err_str[16];	/*  assume enough   */
data/traceroute-2.1.0/libsupp/clif.c:232:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy (ss, s, sizeof (ss));
data/traceroute-2.1.0/libsupp/clif.c:236:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy (ss, s, sizeof (ss));
data/traceroute-2.1.0/traceroute/as_lookups.c:78:2:  [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 (ra_buf, "*");
data/traceroute-2.1.0/traceroute/as_lookups.c:111: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).
		    if (!q || (*(q += strlen (as)) != '\0' && *q != '/')) {
data/traceroute-2.1.0/traceroute/mod-tcp.c:170: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 buf[sizeof (SYSCTL_PREFIX) + strlen (name) + 1];
data/traceroute-2.1.0/traceroute/mod-tcp.c:179:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	res = read (fd, &ch, sizeof (ch));
data/traceroute-2.1.0/traceroute/traceroute.c:182:6:  [1] (buffer) strlen:
  Does not handle 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 (p);
data/traceroute-2.1.0/traceroute/traceroute.c:1332:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy (pb->err_str, str, sizeof (pb->err_str));
data/traceroute-2.1.0/traceroute/traceroute.c:1572: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).
					device, strlen (device) + 1) < 0

ANALYSIS SUMMARY:

Hits = 68
Lines analyzed = 5365 in approximately 0.14 seconds (38384 lines/second)
Physical Source Lines of Code (SLOC) = 3562
Hits@level = [0]  60 [1]   9 [2]  38 [3]   4 [4]  17 [5]   0
Hits@level+ = [0+] 128 [1+]  68 [2+]  59 [3+]  21 [4+]  17 [5+]   0
Hits/KSLOC@level+ = [0+] 35.9349 [1+] 19.0904 [2+] 16.5637 [3+] 5.89556 [4+] 4.7726 [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.