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/alfred-2020.3/alfred.h
Examining data/alfred-2020.3/batadv_query.c
Examining data/alfred-2020.3/batadv_query.h
Examining data/alfred-2020.3/batadv_querynl.c
Examining data/alfred-2020.3/batadv_querynl.h
Examining data/alfred-2020.3/batman_adv.h
Examining data/alfred-2020.3/bitops.h
Examining data/alfred-2020.3/client.c
Examining data/alfred-2020.3/debugfs.c
Examining data/alfred-2020.3/debugfs.h
Examining data/alfred-2020.3/gpsd/alfred-gpsd.c
Examining data/alfred-2020.3/gpsd/alfred-gpsd.h
Examining data/alfred-2020.3/hash.c
Examining data/alfred-2020.3/hash.h
Examining data/alfred-2020.3/list.h
Examining data/alfred-2020.3/main.c
Examining data/alfred-2020.3/netlink.c
Examining data/alfred-2020.3/netlink.h
Examining data/alfred-2020.3/netsock.c
Examining data/alfred-2020.3/packet.h
Examining data/alfred-2020.3/recv.c
Examining data/alfred-2020.3/send.c
Examining data/alfred-2020.3/server.c
Examining data/alfred-2020.3/unix_sock.c
Examining data/alfred-2020.3/util.c
Examining data/alfred-2020.3/vis/vis.c
Examining data/alfred-2020.3/vis/vis.h

FINAL RESULTS:

data/alfred-2020.3/debugfs.c:41:9:  [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.
	return snprintf(buffer, size, fmt, debugfs_mountpoint, mesh_iface);
data/alfred-2020.3/gpsd/alfred-gpsd.c:88:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(globals->gpsd_data->tpv,
data/alfred-2020.3/server.c:362:3:  [4] (shell) system:
  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.
		system(command);
data/alfred-2020.3/vis/vis.c:541:3:  [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(path_buff, sizeof(path_buff), SYS_IFACE_STATUS_FMT,
data/alfred-2020.3/gpsd/alfred-gpsd.c:119:34:  [3] (random) random:
  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.
	globals->request->tx_id = htons(random());
data/alfred-2020.3/gpsd/alfred-gpsd.c:417:16:  [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 ((opt = getopt_long(argc, argv, "shl:g:vu:", long_options,
data/alfred-2020.3/main.c:197:16:  [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 ((opt = getopt_long(argc, argv, "ms:r:hi:b:vV:M:I:u:dc:p:4:", long_options,
data/alfred-2020.3/util.c:49: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(s);
data/alfred-2020.3/util.c:54:9:  [3] (random) random:
  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.
	return random();
data/alfred-2020.3/vis/vis.c:872:34:  [3] (random) random:
  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.
	globals->request->tx_id = htons(random());
data/alfred-2020.3/vis/vis.c:1255:16:  [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 ((opt = getopt_long(argc, argv, "shf:i:vu:", long_options,
data/alfred-2020.3/batadv_query.c:140: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 full_path[MAX_PATH + 1];
data/alfred-2020.3/batadv_query.c:145:6:  [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(full_path, "r");
data/alfred-2020.3/batadv_query.c:156:6:  [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(full_path, "r");
data/alfred-2020.3/batadv_query.c:191: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 full_path[MAX_PATH+1];
data/alfred-2020.3/batadv_query.c:203:6:  [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(full_path, "r");
data/alfred-2020.3/batadv_query.c:352: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 full_path[MAX_PATH + 1];
data/alfred-2020.3/batadv_query.c:364:6:  [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(full_path, "r");
data/alfred-2020.3/client.c:25:11:  [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 buf[MAX_PAYLOAD], *pos;
data/alfred-2020.3/client.c:140:11:  [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 buf[MAX_PAYLOAD];
data/alfred-2020.3/client.c:182:11:  [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 buf[MAX_PAYLOAD];
data/alfred-2020.3/client.c:251:11:  [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 buf[MAX_PAYLOAD];
data/alfred-2020.3/debugfs.c:21: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 debugfs_mountpoint[MAX_PATH+1];
data/alfred-2020.3/debugfs.c:50: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 type[100];
data/alfred-2020.3/debugfs.c:69:7:  [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("/proc/mounts", "r");
data/alfred-2020.3/gpsd/alfred-gpsd.c:85: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 tbuf[JSON_DATE_MAX+1];
data/alfred-2020.3/gpsd/alfred-gpsd.c:180: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(source, data->source, ETH_ALEN);
data/alfred-2020.3/gpsd/alfred-gpsd.c:304: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[4096];
data/alfred-2020.3/gpsd/alfred-gpsd.h:55: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.
	__extension__ char tpv[0];
data/alfred-2020.3/main.c:202: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).
			i = atoi(optarg);
data/alfred-2020.3/main.c:213: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).
			i = atoi(optarg);
data/alfred-2020.3/main.c:231: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).
			i = atoi(optarg);
data/alfred-2020.3/main.c:236: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).
			globals->clientmode_version = atoi(optarg);
data/alfred-2020.3/netsock.c:242: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(&interface->hwaddr, &ifr.ifr_hwaddr.sa_data, 6);
data/alfred-2020.3/netsock.c:359: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(&interface->hwaddr, &ifr.ifr_hwaddr.sa_data, 6);
data/alfred-2020.3/netsock.c:412: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(&interface->address.ipv4,
data/alfred-2020.3/packet.h:147: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 ifaces[IFNAMSIZ * 16];
data/alfred-2020.3/recv.c:63: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(&dataset->data, data, sizeof(*data));
data/alfred-2020.3/recv.c:96: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(dataset->buf, data->data, data_len);
data/alfred-2020.3/recv.c:244: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(transaction_packet->push, push, len + sizeof(push->header));
data/alfred-2020.3/recv.c:284: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(&server->hwaddr, &mac, ETH_ALEN);
data/alfred-2020.3/recv.c:285: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(&server->address, source, sizeof(*source));
data/alfred-2020.3/recv.c:407: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(&alfred_source, &source4.sin_addr, sizeof(source4.sin_addr));
data/alfred-2020.3/recv.c:409: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(&alfred_source, &source6.sin6_addr, sizeof(source6.sin6_addr));
data/alfred-2020.3/send.c:92: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(data, &dataset->data, sizeof(*data));
data/alfred-2020.3/send.c:94: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(data->data, dataset->buf, dataset->data.header.length);
data/alfred-2020.3/send.c:173: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(&dest_addr4.sin_addr, &dest->ipv4, sizeof(dest->ipv4));
data/alfred-2020.3/send.c:182: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(&dest_addr6.sin6_addr, &dest->ipv6, sizeof(dest->ipv6));
data/alfred-2020.3/server.c:326: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[5];
data/alfred-2020.3/unix_sock.c:122: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(data->source, &interface->hwaddr, ETH_ALEN);
data/alfred-2020.3/unix_sock.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(&dataset->data, data, sizeof(*data));
data/alfred-2020.3/unix_sock.c:155: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(dataset->buf, data->data, data_len);
data/alfred-2020.3/unix_sock.c:192: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(data, &dataset->data, sizeof(*data));
data/alfred-2020.3/unix_sock.c:194: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(data->data, dataset->buf, dataset->data.header.length);
data/alfred-2020.3/util.c:119: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(mac, arpreq.arp_ha.sa_data, sizeof(*mac));
data/alfred-2020.3/vis/vis.c:46:7:  [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(fname, "r");
data/alfred-2020.3/vis/vis.c:75: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 macstr[20];
data/alfred-2020.3/vis/vis.c:122: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(mac, &ifr.ifr_hwaddr.sa_data, ETH_ALEN);
data/alfred-2020.3/vis/vis.c:168: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 ifnamebuf[IF_NAMESIZE];
data/alfred-2020.3/vis/vis.c:269: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(v_entry->v.mac, addr, ETH_ALEN);
data/alfred-2020.3/vis/vis.c:305: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 path[1024];
data/alfred-2020.3/vis/vis.c:337: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(v_entry->v.mac, mac, ETH_ALEN);
data/alfred-2020.3/vis/vis.c:532: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 iface_status[IFACE_STATUS_LEN];
data/alfred-2020.3/vis/vis.c:533: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 path_buff[PATH_BUFF_LEN];
data/alfred-2020.3/vis/vis.c:688: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(v_entry->v.mac, orig, ETH_ALEN);
data/alfred-2020.3/vis/vis.c:723: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 path[1024];
data/alfred-2020.3/vis/vis.c:768: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(v_entry->v.mac, mac, ETH_ALEN);
data/alfred-2020.3/vis/vis.c:829: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(&globals->vis_data->ifaces[iface_n], i_entry->mac, ETH_ALEN);
data/alfred-2020.3/vis/vis.c:839: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(&vis_entries[entries_n], &v_entry->v, sizeof(v_entry->v));
data/alfred-2020.3/vis/vis.h:64: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 name[256];
data/alfred-2020.3/batadv_query.c:388: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) == 0) {
data/alfred-2020.3/batadv_query.c:394: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).
				} else if (strlen(token) == 1) {
data/alfred-2020.3/batadv_query.c:402: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 (token[strlen(token) - 1] != ')') {
data/alfred-2020.3/batadv_query.c:405: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).
					token[strlen(token) - 1] = '\0';
data/alfred-2020.3/client.c:54:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((ret = read(globals->unix_sock, buf, sizeof(*tlv))) > 0) {
data/alfred-2020.3/client.c:65:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(globals->unix_sock, buf + sizeof(*tlv),
data/alfred-2020.3/client.c:73:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(globals->unix_sock, buf + sizeof(*push),
data/alfred-2020.3/client.c:87:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(globals->unix_sock,
data/alfred-2020.3/client.c:125:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(globals->unix_sock, buf + sizeof(*tlv),
data/alfred-2020.3/client.c:223: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(iface) > IFNAMSIZ) {
data/alfred-2020.3/client.c:235:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ifr.ifr_name, iface, IFNAMSIZ);
data/alfred-2020.3/client.c:260: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).
	interface_len = strlen(globals->change_interface);
data/alfred-2020.3/client.c:273:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(change_interface->ifaces, globals->change_interface,
data/alfred-2020.3/debugfs.c:36: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(debugfs_mountpoint) == 0) {
data/alfred-2020.3/debugfs.c:60:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(debugfs_mountpoint, *ptr,
data/alfred-2020.3/debugfs.c:75:9:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	while (fscanf(fp, "%*s %"
data/alfred-2020.3/debugfs.c:135:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(debugfs_mountpoint, mountpoint, sizeof(debugfs_mountpoint));
data/alfred-2020.3/gpsd/alfred-gpsd.c:27:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(addr.sun_path, globals->unix_path, sizeof(addr.sun_path));
data/alfred-2020.3/gpsd/alfred-gpsd.c:95: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).
			htonl(strlen(globals->gpsd_data->tpv) + 1);
data/alfred-2020.3/gpsd/alfred-gpsd.c:144:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(sock, buf, sizeof(*tlv));
data/alfred-2020.3/gpsd/alfred-gpsd.c:166:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(sock, buf + sizeof(*tlv), l);
data/alfred-2020.3/gpsd/alfred-gpsd.c:312:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(globals->gpsdata.gps_fd, &buf[cnt], 1);
data/alfred-2020.3/gpsd/alfred-gpsd.c:338:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(globals->gpsd_data->tpv, buf, tpv_size);
data/alfred-2020.3/gpsd/alfred-gpsd.c:342: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).
			htonl(strlen(globals->gpsd_data->tpv) + 1);
data/alfred-2020.3/gpsd/alfred-gpsd.c:477:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(globals->gpsd_data->tpv, GPSD_INIT_TPV, tpv_size);
data/alfred-2020.3/gpsd/alfred-gpsd.c:480: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).
		htonl(strlen(globals->gpsd_data->tpv) + 1);
data/alfred-2020.3/netsock.c:228:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ifr.ifr_name, interface->interface, IFNAMSIZ);
data/alfred-2020.3/netsock.c:260: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).
		       strlen(interface->interface) + 1)) {
data/alfred-2020.3/netsock.c:267: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).
		       strlen(interface->interface) + 1)) {
data/alfred-2020.3/netsock.c:353:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ifr.ifr_name, interface->interface, IFNAMSIZ);
data/alfred-2020.3/netsock.c:373: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).
		       strlen(interface->interface) + 1)) {
data/alfred-2020.3/netsock.c:379: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).
		       interface->interface, strlen(interface->interface) + 1)) {
data/alfred-2020.3/server.c:264:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ifr.ifr_name, interface->interface, IFNAMSIZ);
data/alfred-2020.3/server.c:340: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).
	command_len = strlen(globals->update_command);
data/alfred-2020.3/server.c:346:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(command, globals->update_command, command_len - 1);
data/alfred-2020.3/server.c:353:3:  [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(command, buf, command_len - strlen(command) - 1);
data/alfred-2020.3/server.c:353: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).
		strncat(command, buf, command_len - strlen(command) - 1);
data/alfred-2020.3/unix_sock.c:40:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(addr.sun_path, globals->unix_path, sizeof(addr.sun_path));
data/alfred-2020.3/unix_sock.c:69:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(addr.sun_path, globals->unix_path, sizeof(addr.sun_path));
data/alfred-2020.3/unix_sock.c:365:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	length = read(client_sock, buf, sizeof(buf));
data/alfred-2020.3/util.c:107:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(arpreq.arp_dev, interface->interface, sizeof(arpreq.arp_dev));
data/alfred-2020.3/util.c:112:3:  [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(200000);
data/alfred-2020.3/vis/vis.c:105:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
data/alfred-2020.3/vis/vis.c:156:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(i_entry->name, ifname, sizeof(i_entry->name));
data/alfred-2020.3/vis/vis.c:195:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(i_entry->name, ifname, sizeof(i_entry->name));
data/alfred-2020.3/vis/vis.c:215:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(addr.sun_path, globals->unix_path, sizeof(addr.sun_path));
data/alfred-2020.3/vis/vis.c:460:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(iface_status, "active\n", IFACE_STATUS_LEN);
data/alfred-2020.3/vis/vis.c:462:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(iface_status, "inactive\n", IFACE_STATUS_LEN);
data/alfred-2020.3/vis/vis.c:516: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(iface_status) > 0)
data/alfred-2020.3/vis/vis.c:896:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(sock, buf, sizeof(*tlv));
data/alfred-2020.3/vis/vis.c:918:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(sock, buf + sizeof(*tlv), l);

ANALYSIS SUMMARY:

Hits = 121
Lines analyzed = 8708 in approximately 0.21 seconds (40571 lines/second)
Physical Source Lines of Code (SLOC) = 5836
Hits@level = [0] 149 [1]  51 [2]  59 [3]   7 [4]   4 [5]   0
Hits@level+ = [0+] 270 [1+] 121 [2+]  70 [3+]  11 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 46.2646 [1+] 20.7334 [2+] 11.9945 [3+] 1.88485 [4+] 0.685401 [5+]   0
Symlinks skipped = 5 (--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.