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/nsntrace-3.9.g35e174d/src/capture.c
Examining data/nsntrace-3.9.g35e174d/src/capture.h
Examining data/nsntrace-3.9.g35e174d/src/cmd.c
Examining data/nsntrace-3.9.g35e174d/src/cmd.h
Examining data/nsntrace-3.9.g35e174d/src/net.c
Examining data/nsntrace-3.9.g35e174d/src/net.h
Examining data/nsntrace-3.9.g35e174d/src/nsntrace.c
Examining data/nsntrace-3.9.g35e174d/tests/udp_send.c

FINAL RESULTS:

data/nsntrace-3.9.g35e174d/src/cmd.c:75:3:  [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(cmd, 1024, format, arg);
data/nsntrace-3.9.g35e174d/src/cmd.c:77: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.
		return execvp(args[0], args);
data/nsntrace-3.9.g35e174d/src/nsntrace.c:239:6:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	if (execvp(options->args[0], options->args) < 0) {
data/nsntrace-3.9.g35e174d/src/nsntrace.c:313:14:  [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.
	while ((c = getopt_long(argc, argv, short_opt, long_opt, NULL)) > 0) {
data/nsntrace-3.9.g35e174d/src/nsntrace.c:379: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.
		if( NULL == getenv("SUDO_UID") ) {
data/nsntrace-3.9.g35e174d/src/capture.c:69: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 errbuf[PCAP_ERRBUF_SIZE];
data/nsntrace-3.9.g35e174d/src/capture.c:129: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 errbuf[PCAP_ERRBUF_SIZE];
data/nsntrace-3.9.g35e174d/src/cmd.c:70: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 *args[64];
data/nsntrace-3.9.g35e174d/src/cmd.c:71: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 cmd[1024];
data/nsntrace-3.9.g35e174d/src/net.c:360:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fd = open(ip_forward_path, O_RDONLY)) < 0) {
data/nsntrace-3.9.g35e174d/src/nsntrace.c:84: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 child_stack[STACK_SIZE];
data/nsntrace-3.9.g35e174d/tests/udp_send.c:20:9:  [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).
	port = atoi(argv[1]);
data/nsntrace-3.9.g35e174d/tests/udp_send.c:21:8:  [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).
	num = atoi(argv[2]);
data/nsntrace-3.9.g35e174d/src/net.c:364:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(fd, &ch, 1) < 0) {
data/nsntrace-3.9.g35e174d/tests/udp_send.c:36: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).
		ret = sendto(s, message, strlen(message), 0,

ANALYSIS SUMMARY:

Hits = 15
Lines analyzed = 1150 in approximately 0.04 seconds (29673 lines/second)
Physical Source Lines of Code (SLOC) = 714
Hits@level = [0]  27 [1]   2 [2]   8 [3]   2 [4]   3 [5]   0
Hits@level+ = [0+]  42 [1+]  15 [2+]  13 [3+]   5 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 58.8235 [1+] 21.0084 [2+] 18.2073 [3+] 7.0028 [4+] 4.20168 [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.