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/flowgrind-0.8.0/src/fg_progname.c
Examining data/flowgrind-0.8.0/src/fg_string.h
Examining data/flowgrind-0.8.0/src/flowgrind.c
Examining data/flowgrind-0.8.0/src/fg_log.h
Examining data/flowgrind-0.8.0/src/fg_barrier.c
Examining data/flowgrind-0.8.0/src/fg_time.c
Examining data/flowgrind-0.8.0/src/fg_argparser.h
Examining data/flowgrind-0.8.0/src/fg_rpc_client.h
Examining data/flowgrind-0.8.0/src/fg_error.h
Examining data/flowgrind-0.8.0/src/source.c
Examining data/flowgrind-0.8.0/src/trafgen.c
Examining data/flowgrind-0.8.0/src/fg_log.c
Examining data/flowgrind-0.8.0/src/fg_pcap.c
Examining data/flowgrind-0.8.0/src/fg_barrier.h
Examining data/flowgrind-0.8.0/src/destination.c
Examining data/flowgrind-0.8.0/src/flowgrindd.c
Examining data/flowgrind-0.8.0/src/fg_progname.h
Examining data/flowgrind-0.8.0/src/fg_affinity.h
Examining data/flowgrind-0.8.0/src/fg_pcap.h
Examining data/flowgrind-0.8.0/src/fg_list.h
Examining data/flowgrind-0.8.0/src/destination.h
Examining data/flowgrind-0.8.0/src/daemon.h
Examining data/flowgrind-0.8.0/src/source.h
Examining data/flowgrind-0.8.0/src/fg_affinity.c
Examining data/flowgrind-0.8.0/src/flowgrind_stop.c
Examining data/flowgrind-0.8.0/src/flowgrind.h
Examining data/flowgrind-0.8.0/src/debug.c
Examining data/flowgrind-0.8.0/src/fg_time.h
Examining data/flowgrind-0.8.0/src/trafgen.h
Examining data/flowgrind-0.8.0/src/fg_math.h
Examining data/flowgrind-0.8.0/src/fg_definitions.h
Examining data/flowgrind-0.8.0/src/fg_rpc_client.c
Examining data/flowgrind-0.8.0/src/common.h
Examining data/flowgrind-0.8.0/src/fg_argparser.c
Examining data/flowgrind-0.8.0/src/fg_error.c
Examining data/flowgrind-0.8.0/src/fg_list.c
Examining data/flowgrind-0.8.0/src/fg_math.c
Examining data/flowgrind-0.8.0/src/fg_rpc_server.c
Examining data/flowgrind-0.8.0/src/fg_string.c
Examining data/flowgrind-0.8.0/src/fg_socket.h
Examining data/flowgrind-0.8.0/src/fg_socket.c
Examining data/flowgrind-0.8.0/src/fg_rpc_server.h
Examining data/flowgrind-0.8.0/src/daemon.c
Examining data/flowgrind-0.8.0/src/debug.h

FINAL RESULTS:

data/flowgrind-0.8.0/src/daemon.c:121:2:  [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(str, 1000, fmt, ap);
data/flowgrind-0.8.0/src/daemon.c:125: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(flow->error, str);
data/flowgrind-0.8.0/src/daemon.c:134:2:  [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(str, 1000, fmt, ap);
data/flowgrind-0.8.0/src/daemon.c:138: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(request->error, str);
data/flowgrind-0.8.0/src/daemon.c:1541: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(server_uuid,uuid_str);
data/flowgrind-0.8.0/src/daemon.c:1544: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(uuid_str,server_uuid);
data/flowgrind-0.8.0/src/fg_error.c:58:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, ap);
data/flowgrind-0.8.0/src/fg_error.h:81:24:  [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/flowgrind-0.8.0/src/fg_log.c:89:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(stderr, fmt, ap);
data/flowgrind-0.8.0/src/fg_log.c:95:3:  [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(stdout, fmt, ap);
data/flowgrind-0.8.0/src/fg_log.h:66:24:  [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, 2, 3)));
data/flowgrind-0.8.0/src/fg_log.h:76:24:  [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, 2, 0)));
data/flowgrind-0.8.0/src/fg_rpc_server.c:225: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(source_settings.destination_host, destination_host);
data/flowgrind-0.8.0/src/fg_rpc_server.c:226: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(settings.cc_alg, cc_alg);
data/flowgrind-0.8.0/src/fg_rpc_server.c:227: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(settings.bind_address, bind_address);
data/flowgrind-0.8.0/src/fg_rpc_server.c:428: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(settings.cc_alg, cc_alg);
data/flowgrind-0.8.0/src/fg_rpc_server.c:429: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(settings.bind_address, bind_address);
data/flowgrind-0.8.0/src/fg_string.c:70:18:  [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.
	size_t length = vsnprintf(&c, 1, fmt, ap2);
data/flowgrind-0.8.0/src/fg_string.c:129:18:  [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.
	size_t length = vsnprintf(*strp + slen, alen + 1, fmt, ap2);
data/flowgrind-0.8.0/src/fg_string.h:76:24:  [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, 2, 3)));
data/flowgrind-0.8.0/src/fg_string.h:91:24:  [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, 2, 0)));
data/flowgrind-0.8.0/src/flowgrind.c:211:24:  [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, 1, 2)));
data/flowgrind-0.8.0/src/flowgrind.c:233:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stdout,
data/flowgrind-0.8.0/src/flowgrind.c:563:23:  [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 (!copt.clobber && access(log_filename, R_OK) == 0)
data/flowgrind-0.8.0/src/flowgrind.c:598:3:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vprintf(fmt, ap);
data/flowgrind-0.8.0/src/flowgrind.c:602:3:  [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(log_stream, fmt, ap);
data/flowgrind-0.8.0/src/flowgrind.c:732: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(daemon->uuid, server_uuid);
data/flowgrind-0.8.0/src/flowgrind.c:2209: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(flow_rpc_info->server_url, server_url);
data/flowgrind-0.8.0/src/flowgrind.c:2210: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(flow_rpc_info->server_name, server_name);
data/flowgrind-0.8.0/src/flowgrind.c:2466: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(endpoint->test_address, arg);
data/flowgrind-0.8.0/src/flowgrind.c:2541: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(settings->cc_alg, arg + 16);
data/flowgrind-0.8.0/src/flowgrind.c:2547: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(settings->cc_alg, arg + 15);
data/flowgrind-0.8.0/src/flowgrindd.c:234:6:  [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(dump_dir, W_OK | X_OK) == -1) {
data/flowgrind-0.8.0/src/flowgrindd.c:289:8:  [4] (buffer) sscanf:
  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 (sscanf(arg, "%s", rpc_bind_addr) != 1)
data/flowgrind-0.8.0/src/fg_math.c:91: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((unsigned)seed);
data/flowgrind-0.8.0/src/common.h:183: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 bind_address[1000];
data/flowgrind-0.8.0/src/common.h:236: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 cc_alg[TCP_CA_NAME_MAX];
data/flowgrind-0.8.0/src/common.h:260: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 optval[MAX_EXTRA_SOCKET_OPTION_VALUE_LENGTH];
data/flowgrind-0.8.0/src/daemon.c:117: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[1000];
data/flowgrind-0.8.0/src/daemon.c:130:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char str[1000];
data/flowgrind-0.8.0/src/daemon.c:449: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 tmp[100];
data/flowgrind-0.8.0/src/daemon.c:1021: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 timestamp[30] = "";
data/flowgrind-0.8.0/src/daemon.c:1057: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 cbuf[512];
data/flowgrind-0.8.0/src/daemon.c:1060: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 cbuf[16];
data/flowgrind-0.8.0/src/daemon.c:1535: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 server_uuid[38] = "";
data/flowgrind-0.8.0/src/daemon.h:65:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char destination_host[256];
data/flowgrind-0.8.0/src/daemon.h:112: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 finished[2];
data/flowgrind-0.8.0/src/daemon.h:215: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 cc_alg[TCP_CA_NAME_MAX];
data/flowgrind-0.8.0/src/daemon.h:244: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 server_uuid[38]; /**< UUID from the daemon. */
data/flowgrind-0.8.0/src/debug.c:68: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 timestamp[30] = "";
data/flowgrind-0.8.0/src/fg_argparser.c:252:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char code_str[2];
data/flowgrind-0.8.0/src/fg_log.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 timestamp[30] = "";
data/flowgrind-0.8.0/src/fg_math.c:78: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).
		int data = open("/dev/urandom", O_RDONLY);
data/flowgrind-0.8.0/src/fg_pcap.c:73: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 errbuf[PCAP_ERRBUF_SIZE] = "";
data/flowgrind-0.8.0/src/fg_pcap.c:254: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 timestamp[30] = "";
data/flowgrind-0.8.0/src/fg_pcap.c:259: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 hostname[128] = "";
data/flowgrind-0.8.0/src/fg_rpc_client.c:53: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).
                *port = atoi(sepptr);
data/flowgrind-0.8.0/src/fg_rpc_client.c:64: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).
                        *port = atoi(sepptr);
data/flowgrind-0.8.0/src/fg_rpc_server.c:218:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(settings.extra_socket_options[i].optval, buffer, len);
data/flowgrind-0.8.0/src/fg_rpc_server.c:421:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(settings.extra_socket_options[i].optval, buffer, len);
data/flowgrind-0.8.0/src/fg_rpc_server.c:789: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 tmp_port[100];
data/flowgrind-0.8.0/src/fg_rpc_server.c:795: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(tmp_port, "%u", port);
data/flowgrind-0.8.0/src/fg_socket.c:155: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 rspace[3 + 4 * NROUTES + 1];
data/flowgrind-0.8.0/src/fg_socket.c:376: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 host[NI_MAXHOST];
data/flowgrind-0.8.0/src/fg_socket.c:445: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 service[NI_MAXSERV];
data/flowgrind-0.8.0/src/fg_socket.c:454: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).
	return atoi(service);
data/flowgrind-0.8.0/src/fg_string.c:55: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(&ret[slen], a, alen);
data/flowgrind-0.8.0/src/fg_time.c:88: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[30];
data/flowgrind-0.8.0/src/flowgrind.c:500:4:  [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(cflow[id].endpoint[*i].test_address, "localhost");
data/flowgrind-0.8.0/src/flowgrind.c:540: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).
		int data = open("/dev/urandom", O_RDONLY);
data/flowgrind-0.8.0/src/flowgrind.c:566: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).
	log_stream = fopen(log_filename, "w");
data/flowgrind-0.8.0/src/flowgrind.c:3035: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(option->optval, &v, sizeof(v));
data/flowgrind-0.8.0/src/flowgrind.h:203:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char uuid[38];
data/flowgrind-0.8.0/src/flowgrind.h:207: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 os_name[257];
data/flowgrind-0.8.0/src/flowgrind.h:209: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 os_release[257];
data/flowgrind-0.8.0/src/flowgrind.h:217: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 server_url[1000];
data/flowgrind-0.8.0/src/flowgrind.h:219: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 server_name[257];
data/flowgrind-0.8.0/src/flowgrind.h:235: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 test_address[1000];
data/flowgrind-0.8.0/src/flowgrind.h:269: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 finished[2];
data/flowgrind-0.8.0/src/source.c:83: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 service[7];
data/flowgrind-0.8.0/src/source.c:136: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(*saptr, res->ai_addr, res->ai_addrlen);
data/flowgrind-0.8.0/src/daemon.c:124: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).
	flow->error = malloc(strlen(str) + 1);
data/flowgrind-0.8.0/src/daemon.c:137: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).
	request->error = malloc(strlen(str) + 1);
data/flowgrind-0.8.0/src/daemon.c:451:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		int rc = read(daemon_pipe[0], tmp, 100);
data/flowgrind-0.8.0/src/daemon.c:1537:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (!strlen(server_uuid)) {
data/flowgrind-0.8.0/src/fg_argparser.c:69: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).
	const int len = strlen(argument);
data/flowgrind-0.8.0/src/fg_argparser.c:83:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(p->argument, argument, len + 1);
data/flowgrind-0.8.0/src/fg_argparser.c:106: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).
	const int len = strlen(msg);
data/flowgrind-0.8.0/src/fg_argparser.c:111:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ap->error + ap->error_size, msg, len + 1);
data/flowgrind-0.8.0/src/fg_argparser.c:169:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strlen(options[i].name) == len) {
data/flowgrind-0.8.0/src/fg_math.c:79:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		rc = read(data, &seed, sizeof (long) );
data/flowgrind-0.8.0/src/fg_rpc_server.c:170: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).
	if (strlen(bind_address) >= sizeof(settings.bind_address) - 1 ||
data/flowgrind-0.8.0/src/fg_rpc_server.c:175:3:  [1] (buffer) strlen:
  Does not handle 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(destination_host) >= sizeof(source_settings.destination_host) - 1||
data/flowgrind-0.8.0/src/fg_rpc_server.c:177:3:  [1] (buffer) strlen:
  Does not handle 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(cc_alg) > TCP_CA_NAME_MAX ||
data/flowgrind-0.8.0/src/fg_rpc_server.c:377: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).
	if (strlen(bind_address) >= sizeof(settings.bind_address) - 1 ||
data/flowgrind-0.8.0/src/fg_rpc_server.c:383:3:  [1] (buffer) strlen:
  Does not handle 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(cc_alg) > TCP_CA_NAME_MAX ||
data/flowgrind-0.8.0/src/fg_socket.c:269:61:  [1] (buffer) strlen:
  Does not handle 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 setsockopt(fd, IPPROTO_TCP, TCP_CONGESTION, cc_alg, strlen(cc_alg));
data/flowgrind-0.8.0/src/fg_string.c:84:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return strlendup_append(s, strlen(s), a, strlen(a));
data/flowgrind-0.8.0/src/fg_string.c:84: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).
	return strlendup_append(s, strlen(s), a, strlen(a));
data/flowgrind-0.8.0/src/fg_string.c:95:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return strlendup_append(s, strlen(s), a, strnlen(a, n));
data/flowgrind-0.8.0/src/fg_string.c:114:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t slen = strlen(*strp);
data/flowgrind-0.8.0/src/flowgrind.c:541:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		int rc = read(data, &cflow[id].random_seed, sizeof (int) );
data/flowgrind-0.8.0/src/flowgrind.c:698:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(daemon->os_name, os_name, 256);
data/flowgrind-0.8.0/src/flowgrind.c:699:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(daemon->os_release, os_release, 256);
data/flowgrind-0.8.0/src/flowgrind.c:705:6:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	if (mismatch) {
data/flowgrind-0.8.0/src/flowgrind.c:1275:4:  [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(copt.reporting_interval - time_diff(&lastreport_begin,&lastreport_end) );
data/flowgrind-0.8.0/src/flowgrind.c:1673: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).
	unsigned data_len = strlen(value);
data/flowgrind-0.8.0/src/flowgrind.c:1674: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 header_len = MAX(strlen(column->header.name),
data/flowgrind-0.8.0/src/flowgrind.c:1675:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				  strlen(column->header.unit));
data/flowgrind-0.8.0/src/flowgrind.c:1738: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 header_len = MAX(strlen(column->header.name),
data/flowgrind-0.8.0/src/flowgrind.c:1739:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				  strlen(column->header.unit));
data/flowgrind-0.8.0/src/flowgrind.c:2537:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strlen(arg + 16) >= sizeof(cflow[0].settings[SOURCE].cc_alg))
data/flowgrind-0.8.0/src/flowgrind.c:2543:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strlen(arg + 16) >= sizeof(cflow[0].settings[SOURCE].cc_alg))
data/flowgrind-0.8.0/src/flowgrind.c:2719:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (!arg || !strlen(arg))
data/flowgrind-0.8.0/src/flowgrindd.c:241: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).
	if (dump_dir[strlen(dump_dir) - 1] != '/')

ANALYSIS SUMMARY:

Hits = 115
Lines analyzed = 12333 in approximately 0.40 seconds (30967 lines/second)
Physical Source Lines of Code (SLOC) = 7718
Hits@level = [0]  40 [1]  34 [2]  46 [3]   1 [4]  34 [5]   0
Hits@level+ = [0+] 155 [1+] 115 [2+]  81 [3+]  35 [4+]  34 [5+]   0
Hits/KSLOC@level+ = [0+] 20.0829 [1+] 14.9002 [2+] 10.4949 [3+] 4.53485 [4+] 4.40529 [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.