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/fence-virt-1.0.0/client/main.c
Examining data/fence-virt-1.0.0/client/mcast.c
Examining data/fence-virt-1.0.0/client/options.c
Examining data/fence-virt-1.0.0/client/serial.c
Examining data/fence-virt-1.0.0/client/tcp.c
Examining data/fence-virt-1.0.0/client/vsock.c
Examining data/fence-virt-1.0.0/common/bcast.c
Examining data/fence-virt-1.0.0/common/debug.c
Examining data/fence-virt-1.0.0/common/fdops.c
Examining data/fence-virt-1.0.0/common/ip_lookup.c
Examining data/fence-virt-1.0.0/common/log.c
Examining data/fence-virt-1.0.0/common/mcast.c
Examining data/fence-virt-1.0.0/common/simple_auth.c
Examining data/fence-virt-1.0.0/common/tcp.c
Examining data/fence-virt-1.0.0/config/config-stack.h
Examining data/fence-virt-1.0.0/config/simpleconfig.c
Examining data/fence-virt-1.0.0/include/bcast.h
Examining data/fence-virt-1.0.0/include/client.h
Examining data/fence-virt-1.0.0/include/debug.h
Examining data/fence-virt-1.0.0/include/fdops.h
Examining data/fence-virt-1.0.0/include/history.h
Examining data/fence-virt-1.0.0/include/ip_lookup.h
Examining data/fence-virt-1.0.0/include/list.h
Examining data/fence-virt-1.0.0/include/mcast.h
Examining data/fence-virt-1.0.0/include/options.h
Examining data/fence-virt-1.0.0/include/server_plugin.h
Examining data/fence-virt-1.0.0/include/simple_auth.h
Examining data/fence-virt-1.0.0/include/simpleconfig.h
Examining data/fence-virt-1.0.0/include/static_map.h
Examining data/fence-virt-1.0.0/include/tcp.h
Examining data/fence-virt-1.0.0/include/tcp_listener.h
Examining data/fence-virt-1.0.0/include/xvm.h
Examining data/fence-virt-1.0.0/server/config.c
Examining data/fence-virt-1.0.0/server/cpg-virt.c
Examining data/fence-virt-1.0.0/server/cpg.c
Examining data/fence-virt-1.0.0/server/cpg.h
Examining data/fence-virt-1.0.0/server/daemon_init.c
Examining data/fence-virt-1.0.0/server/history.c
Examining data/fence-virt-1.0.0/server/libvirt-qmf.cpp
Examining data/fence-virt-1.0.0/server/libvirt.c
Examining data/fence-virt-1.0.0/server/main.c
Examining data/fence-virt-1.0.0/server/mcast.c
Examining data/fence-virt-1.0.0/server/null.c
Examining data/fence-virt-1.0.0/server/plugin.c
Examining data/fence-virt-1.0.0/server/pm-fence.c
Examining data/fence-virt-1.0.0/server/serial.c
Examining data/fence-virt-1.0.0/server/serial.h
Examining data/fence-virt-1.0.0/server/static_map.c
Examining data/fence-virt-1.0.0/server/tcp.c
Examining data/fence-virt-1.0.0/server/uuid-test.c
Examining data/fence-virt-1.0.0/server/uuid-test.h
Examining data/fence-virt-1.0.0/server/virt-serial.c
Examining data/fence-virt-1.0.0/server/virt-sockets.c
Examining data/fence-virt-1.0.0/server/virt.c
Examining data/fence-virt-1.0.0/server/virt.h
Examining data/fence-virt-1.0.0/server/vsock.c

FINAL RESULTS:

data/fence-virt-1.0.0/common/log.c:144: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(logmsg + strlen(logmsg), LOGLEN - strlen(logmsg), 
data/fence-virt-1.0.0/include/debug.h:28:3:  [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.
		printf(fmt, ##args); \
data/fence-virt-1.0.0/server/config.c:78: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(val, sizeof(val), MODULE_PATH);
data/fence-virt-1.0.0/server/cpg-virt.c:354: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(freq.vm_name, vm_name);
data/fence-virt-1.0.0/server/main.c:170: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(val, sizeof(val), MODULE_PATH);
data/fence-virt-1.0.0/server/pm-fence.c:622:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(key, "backends/%s/@pmlib_loglevel", BACKEND_NAME);
data/fence-virt-1.0.0/client/options.c:933:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, optstr)) != EOF) {
data/fence-virt-1.0.0/common/simple_auth.c:81: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.
	ret = _read_retry(devrand, req->random, sizeof(req->random), NULL);
data/fence-virt-1.0.0/common/simple_auth.c:81:54:  [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.
	ret = _read_retry(devrand, req->random, sizeof(req->random), NULL);
data/fence-virt-1.0.0/include/xvm.h:85:11:  [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.
	uint8_t  random[6];		/* Random Data */
data/fence-virt-1.0.0/server/main.c:73:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt(argc, argv, "Ff:d:cwlhp:")) != EOF) {
data/fence-virt-1.0.0/client/mcast.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 key[MAX_KEY_LEN];
data/fence-virt-1.0.0/client/options.c:65:16:  [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).
	args->debug = atoi(value);
data/fence-virt-1.0.0/client/options.c:347:21:  [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).
	args->flags |= ( !!atoi(value) ? F_USE_UUID : 0);
data/fence-virt-1.0.0/client/options.c:690: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 out_buf[4096];
data/fence-virt-1.0.0/client/options.c:883: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 in[256];
data/fence-virt-1.0.0/client/serial.c:129: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(file, O_RDWR | O_EXCL)) == -1) {
data/fence-virt-1.0.0/client/serial.c:224: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 speed[32], *flags = NULL;
data/fence-virt-1.0.0/client/tcp.c:95: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 key[MAX_KEY_LEN];
data/fence-virt-1.0.0/client/vsock.c:96: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 key[MAX_KEY_LEN];
data/fence-virt-1.0.0/common/bcast.c:165: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((struct sockaddr_in *)tgt, &mcast, sizeof(struct sockaddr_in));
data/fence-virt-1.0.0/common/bcast.c:193: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(&mreq.ipv6mr_multiaddr, &sin.sin6_addr,
data/fence-virt-1.0.0/common/bcast.c:279: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(&mreq.ipv6mr_multiaddr, &mcast.sin6_addr,
data/fence-virt-1.0.0/common/bcast.c:343: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((struct sockaddr_in *)tgt, &mcast, sizeof(struct sockaddr_in6));
data/fence-virt-1.0.0/common/ip_lookup.c:47: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[256];
data/fence-virt-1.0.0/common/ip_lookup.c:109: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[10240];
data/fence-virt-1.0.0/common/ip_lookup.c:110: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 outbuf[256];
data/fence-virt-1.0.0/common/ip_lookup.c:272: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 ip_name[256];
data/fence-virt-1.0.0/common/mcast.c:204: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((struct sockaddr_in *)tgt, &mcast, sizeof(struct sockaddr_in));
data/fence-virt-1.0.0/common/mcast.c:232: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(&mreq.ipv6mr_multiaddr, &sin.sin6_addr,
data/fence-virt-1.0.0/common/mcast.c:320: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(&mreq.ipv6mr_multiaddr, &mcast.sin6_addr,
data/fence-virt-1.0.0/common/mcast.c:384: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((struct sockaddr_in *)tgt, &mcast, sizeof(struct sockaddr_in6));
data/fence-virt-1.0.0/common/simple_auth.c:52: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 hash[SHA512_LENGTH];
data/fence-virt-1.0.0/common/simple_auth.c:75: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).
	devrand = open("/dev/urandom", O_RDONLY);
data/fence-virt-1.0.0/common/simple_auth.c:108: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 hash[SHA512_LENGTH];
data/fence-virt-1.0.0/common/simple_auth.c:109: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 pkt_hash[SHA512_LENGTH];
data/fence-virt-1.0.0/common/simple_auth.c:213: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 hash[MAX_HASH_LENGTH];
data/fence-virt-1.0.0/common/simple_auth.c:214: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 challenge[MAX_HASH_LENGTH];
data/fence-virt-1.0.0/common/simple_auth.c:215: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 response[MAX_HASH_LENGTH];
data/fence-virt-1.0.0/common/simple_auth.c:222: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).
	devrand = open("/dev/urandom", O_RDONLY);
data/fence-virt-1.0.0/common/simple_auth.c:317: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 challenge[MAX_HASH_LENGTH];
data/fence-virt-1.0.0/common/simple_auth.c:318: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 hash[MAX_HASH_LENGTH];
data/fence-virt-1.0.0/common/simple_auth.c:432: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(file, O_RDONLY);
data/fence-virt-1.0.0/common/tcp.c:368: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, res->ai_addr, res->ai_addrlen);
data/fence-virt-1.0.0/config/simpleconfig.c:171: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/fence-virt-1.0.0/config/simpleconfig.c:216:17:  [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).
				req_index = atoi(id);
data/fence-virt-1.0.0/config/simpleconfig.c:271:17:  [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).
				req_index = atoi(id);
data/fence-virt-1.0.0/config/simpleconfig.c:322:15:  [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).
		req_index = atoi(id);
data/fence-virt-1.0.0/config/simpleconfig.c:347: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/fence-virt-1.0.0/config/simpleconfig.c:436:8:  [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(filename, "r");
data/fence-virt-1.0.0/config/simpleconfig.c:486: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(o, &sc_object, sizeof(*o));
data/fence-virt-1.0.0/server/config.c:26: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 result[10];
data/fence-virt-1.0.0/server/config.c:71: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 val[4096];
data/fence-virt-1.0.0/server/config.c:72: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 inp[4096];
data/fence-virt-1.0.0/server/config.c:110: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 val[4096];
data/fence-virt-1.0.0/server/config.c:111: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 inp[4096];
data/fence-virt-1.0.0/server/config.c:135: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 val[4096];
data/fence-virt-1.0.0/server/config.c:136: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 inp[4096];
data/fence-virt-1.0.0/server/config.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 val[4096];
data/fence-virt-1.0.0/server/config.c:192: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 inp[4096];
data/fence-virt-1.0.0/server/config.c:338: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 val[4096];
data/fence-virt-1.0.0/server/config.c:339: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 inp[4096];
data/fence-virt-1.0.0/server/config.c:442: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 val[4096];
data/fence-virt-1.0.0/server/config.c:443: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 inp[4096];
data/fence-virt-1.0.0/server/config.c:513: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 val[4096];
data/fence-virt-1.0.0/server/config.c:514: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 inp[4096];
data/fence-virt-1.0.0/server/config.c:553: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 val[4096];
data/fence-virt-1.0.0/server/config.c:554: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 inp[4096];
data/fence-virt-1.0.0/server/config.c:596: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 message[80];
data/fence-virt-1.0.0/server/config.c:597: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_filename[4096];
data/fence-virt-1.0.0/server/config.c:628:11:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	tmp_fd = mkstemp(tmp_filename);
data/fence-virt-1.0.0/server/cpg-virt.c:482: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 conf_attr[256];
data/fence-virt-1.0.0/server/cpg-virt.c:483: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 value[1024];
data/fence-virt-1.0.0/server/cpg-virt.c:524: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 value[1024];
data/fence-virt-1.0.0/server/cpg-virt.c:541: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).
		dset(atoi(value));
data/fence-virt-1.0.0/server/cpg.c:43: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 data[0];
data/fence-virt-1.0.0/server/cpg.c:121: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(n->msg, (char *)msg + sizeof(*m), n->msglen);
data/fence-virt-1.0.0/server/cpg.c:217: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(&m->data, data, len);
data/fence-virt-1.0.0/server/cpg.c:260: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(&m->data, vs, sizeof(*vs));
data/fence-virt-1.0.0/server/cpg.c:290: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(&m->data, data, len);
data/fence-virt-1.0.0/server/cpg.c:389: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(&cpg_handle, &h, sizeof(h));
data/fence-virt-1.0.0/server/cpg.h:5: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 vm_name[128];
data/fence-virt-1.0.0/server/daemon_init.c:44: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 pid_filename[PATH_MAX];
data/fence-virt-1.0.0/server/daemon_init.c:51: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 filename[PATH_MAX];
data/fence-virt-1.0.0/server/daemon_init.c:52: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 dirpath[PATH_MAX];
data/fence-virt-1.0.0/server/daemon_init.c:53: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 proc_cmdline[64];	/* yank this from kernel somewhere */
data/fence-virt-1.0.0/server/daemon_init.c:70: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(filename, "r");
data/fence-virt-1.0.0/server/daemon_init.c:125: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(filename, "r");
data/fence-virt-1.0.0/server/daemon_init.c:151: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(pid_filename, "w");
data/fence-virt-1.0.0/server/history.c:100: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(entry->data, data, hinfo->element_size);
data/fence-virt-1.0.0/server/libvirt-qmf.cpp:91: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).
		connection.open();
data/fence-virt-1.0.0/server/libvirt-qmf.cpp:104: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).
			session.open();
data/fence-virt-1.0.0/server/libvirt-qmf.cpp:383: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 value[256];
data/fence-virt-1.0.0/server/libvirt-qmf.cpp:406:30:  [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).
		printf("\n\nPORT = %d\n\n",atoi(value));	
data/fence-virt-1.0.0/server/libvirt-qmf.cpp:407:16:  [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).
		info->port = atoi(value);
data/fence-virt-1.0.0/server/libvirt-qmf.cpp:430:32:  [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).
		printf("\n\nGSSAPI = %d\n\n",atoi(value));	
data/fence-virt-1.0.0/server/libvirt-qmf.cpp:431:7:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		if (atoi(value) > 0) {
data/fence-virt-1.0.0/server/libvirt.c:102: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 conf_attr[256];
data/fence-virt-1.0.0/server/libvirt.c:103: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 value[1024];
data/fence-virt-1.0.0/server/libvirt.c:282: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 value[256];
data/fence-virt-1.0.0/server/libvirt.c:297: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).
		dset(atoi(value));
data/fence-virt-1.0.0/server/main.c:51: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 val[4096];
data/fence-virt-1.0.0/server/main.c:52: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 listener_name[80];
data/fence-virt-1.0.0/server/main.c:53: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 backend_name[80];
data/fence-virt-1.0.0/server/main.c:88:16:  [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).
			debug_set = atoi(optarg);
data/fence-virt-1.0.0/server/main.c:122:16:  [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).
			debug_set = atoi(val);
data/fence-virt-1.0.0/server/main.c:130:17:  [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).
			foreground = atoi(val);
data/fence-virt-1.0.0/server/main.c:136:20:  [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).
			wait_for_init = atoi(val);
data/fence-virt-1.0.0/server/main.c:141:21:  [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).
				wait_for_init = atoi(val);
data/fence-virt-1.0.0/server/mcast.c:91: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 key[MAX_KEY_LEN];
data/fence-virt-1.0.0/server/mcast.c:134: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[128];
data/fence-virt-1.0.0/server/mcast.c:249: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 ip_addr_src[1024];
data/fence-virt-1.0.0/server/mcast.c:409: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 value[1024];
data/fence-virt-1.0.0/server/mcast.c:414: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).
		dset(atoi(value));
data/fence-virt-1.0.0/server/mcast.c:498:16:  [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).
		args->port = atoi(value);
data/fence-virt-1.0.0/server/null.c:132: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 value[256];
data/fence-virt-1.0.0/server/plugin.c:345: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 filename[1024];
data/fence-virt-1.0.0/server/pm-fence.c:613: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 value[256];
data/fence-virt-1.0.0/server/pm-fence.c:614: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 key[32];
data/fence-virt-1.0.0/server/pm-fence.c:620: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).
		dset(atoi(value));
data/fence-virt-1.0.0/server/serial.c:260: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 src_domain[MAX_DOMAINNAME_LENGTH];
data/fence-virt-1.0.0/server/serial.c:345: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 value[1024];
data/fence-virt-1.0.0/server/serial.c:350: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).
		dset(atoi(value));
data/fence-virt-1.0.0/server/serial.c:372:17:  [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).
			args->mode = atoi(value);
data/fence-virt-1.0.0/server/static_map.c:19: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[128];
data/fence-virt-1.0.0/server/static_map.c:26: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[128];
data/fence-virt-1.0.0/server/static_map.c:110: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 value[128];
data/fence-virt-1.0.0/server/static_map.c:111: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[256];
data/fence-virt-1.0.0/server/static_map.c: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 buf2[512];
data/fence-virt-1.0.0/server/static_map.c:213: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(o, &static_map_obj, sizeof(*o));
data/fence-virt-1.0.0/server/tcp.c:73: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 key[MAX_KEY_LEN];
data/fence-virt-1.0.0/server/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 ip_addr_src[1024];
data/fence-virt-1.0.0/server/tcp.c:345: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 value[1024];
data/fence-virt-1.0.0/server/tcp.c:350: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).
		dset(atoi(value));
data/fence-virt-1.0.0/server/tcp.c:434:16:  [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).
		args->port = atoi(value);
data/fence-virt-1.0.0/server/uuid-test.c:11: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_value[37];
data/fence-virt-1.0.0/server/virt-serial.c:111: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 dom_uuid[42];
data/fence-virt-1.0.0/server/virt-serial.c:256: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 dom_uuid[42];
data/fence-virt-1.0.0/server/virt.c:103:4:  [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 d_uuid[MAX_DOMAINNAME_LENGTH];
data/fence-virt-1.0.0/server/virt.c:158: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(&(*vl)->vm_states[0], vm, sizeof(virt_state_t));
data/fence-virt-1.0.0/server/virt.c:169: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(new_vl, *vl, oldlen);
data/fence-virt-1.0.0/server/virt.c:170: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(&new_vl->vm_states[(*vl)->vm_count], vm, sizeof(virt_state_t));
data/fence-virt-1.0.0/server/virt.h:35: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 v_name[MAX_DOMAINNAME_LENGTH];
data/fence-virt-1.0.0/server/virt.h:36: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 v_uuid[MAX_DOMAINNAME_LENGTH];
data/fence-virt-1.0.0/server/vsock.c:73: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 key[MAX_KEY_LEN];
data/fence-virt-1.0.0/server/vsock.c:137: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 peer_cid_str[24];
data/fence-virt-1.0.0/server/vsock.c:205: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 peer_cid_str[24];
data/fence-virt-1.0.0/server/vsock.c:383: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 value[1024];
data/fence-virt-1.0.0/server/vsock.c:388: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).
		dset(atoi(value));
data/fence-virt-1.0.0/server/vsock.c:443:16:  [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).
		args->port = atoi(value);
data/fence-virt-1.0.0/client/mcast.c:114: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((char *)hinfo.uuid) == 0 &&
data/fence-virt-1.0.0/client/mcast.c:115: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((char *)hinfo.domain) == 0)
data/fence-virt-1.0.0/client/mcast.c:215: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).
		if (args->domain && strlen((char *)args->domain)) {
data/fence-virt-1.0.0/client/mcast.c:216:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy((char *)freq.domain, args->domain,
data/fence-virt-1.0.0/client/mcast.c:312: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(args->retr_time * 100000);
data/fence-virt-1.0.0/client/options.c:323: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(value) <= 0) {
data/fence-virt-1.0.0/client/options.c:328: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(value) >= MAX_DOMAINNAME_LENGTH) {
data/fence-virt-1.0.0/client/options.c:696:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(out_buf, desc, sizeof(out_buf) - 1);
data/fence-virt-1.0.0/client/options.c:701: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).
		len = strlen(start);
data/fence-virt-1.0.0/client/options.c:738: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).
	for (x = 0; x < strlen(optstr); x++) {
data/fence-virt-1.0.0/client/options.c:767: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).
	for (x = 0; x < strlen(optstr); x++) {
data/fence-virt-1.0.0/client/serial.c:38:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (!speed || !strlen(speed))
data/fence-virt-1.0.0/client/serial.c:61:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (!param || !strlen(param))
data/fence-virt-1.0.0/client/serial.c:64: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(param) < 3) {
data/fence-virt-1.0.0/client/serial.c:174:2:  [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(delay);
data/fence-virt-1.0.0/client/serial.c:229:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(speed, args->serial.speed, sizeof(speed) - 1);
data/fence-virt-1.0.0/client/serial.c:269:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy((char *)req.domain, args->domain, sizeof(req.domain) - 1);
data/fence-virt-1.0.0/client/tcp.c:123: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).
	if (args->domain && strlen((char *)args->domain))
data/fence-virt-1.0.0/client/tcp.c:124:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy((char *)freq.domain, args->domain, sizeof(freq.domain) - 1);
data/fence-virt-1.0.0/client/vsock.c:123: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).
	if (args->domain && strlen((char *)args->domain))
data/fence-virt-1.0.0/client/vsock.c:124:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy((char *)freq.domain, args->domain, sizeof(freq.domain) - 1);
data/fence-virt-1.0.0/common/fdops.c:170:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n = read(sockfd, buf + (off_t) total, remain);
data/fence-virt-1.0.0/common/log.c:144:21:  [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).
	vsnprintf(logmsg + strlen(logmsg), LOGLEN - strlen(logmsg), 
data/fence-virt-1.0.0/common/log.c:144:46:  [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).
	vsnprintf(logmsg + strlen(logmsg), LOGLEN - strlen(logmsg), 
data/fence-virt-1.0.0/common/simple_auth.c:443:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		nread = read(fd, p, remain);
data/fence-virt-1.0.0/config/simpleconfig.c:188: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).
	assert(strlen(key) < sizeof(buf));
data/fence-virt-1.0.0/config/simpleconfig.c:194:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, ptr, (slash - ptr));
data/fence-virt-1.0.0/config/simpleconfig.c:212: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).
				if (!strlen(id)) {
data/fence-virt-1.0.0/config/simpleconfig.c:251:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, ptr, sizeof(buf) - 1);
data/fence-virt-1.0.0/config/simpleconfig.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).
				if (!strlen(id)) {
data/fence-virt-1.0.0/config/simpleconfig.c:294:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(value, node->val, valuesz);
data/fence-virt-1.0.0/config/simpleconfig.c:305:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buf, ptr, sizeof(buf) - 1);
data/fence-virt-1.0.0/config/simpleconfig.c:358:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, ptr, (slash - ptr));
data/fence-virt-1.0.0/server/config.c:52:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(input, dfl, len);
data/fence-virt-1.0.0/server/config.c:55: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).
	if (input[strlen(input)-1] == '\n')
data/fence-virt-1.0.0/server/config.c:56: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).
		input[strlen(input)-1] = 0;
data/fence-virt-1.0.0/server/config.c:58: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(input) == 0) {
data/fence-virt-1.0.0/server/config.c:59:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(input, dfl, len);
data/fence-virt-1.0.0/server/config.c:121:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(val, DEFAULT_HYPERVISOR_URI, sizeof(val));
data/fence-virt-1.0.0/server/config.c:147:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(val, DEFAULT_HYPERVISOR_URI, sizeof(val));
data/fence-virt-1.0.0/server/config.c:163: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(val, "uuid", sizeof(val));
data/fence-virt-1.0.0/server/config.c:210:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(val, IPV4_MCAST_DEFAULT, sizeof(val));
data/fence-virt-1.0.0/server/config.c:264: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(val, "none", sizeof(val));
data/fence-virt-1.0.0/server/config.c:275: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(inp) > 0) {
data/fence-virt-1.0.0/server/config.c:304:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(val, DEFAULT_KEY_FILE, sizeof(val));
data/fence-virt-1.0.0/server/config.c:315: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(inp) > 0) {
data/fence-virt-1.0.0/server/config.c:355:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(val, IPV4_MCAST_DEFAULT, sizeof(val));
data/fence-virt-1.0.0/server/config.c:408:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(val, DEFAULT_KEY_FILE, sizeof(val));
data/fence-virt-1.0.0/server/config.c:419: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(inp) > 0) {
data/fence-virt-1.0.0/server/config.c:455:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(val, DEFAULT_HYPERVISOR_URI, sizeof(val));
data/fence-virt-1.0.0/server/config.c:467: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(val, "none", sizeof(val));
data/fence-virt-1.0.0/server/config.c:483: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(val, "serial", sizeof(val));
data/fence-virt-1.0.0/server/config.c:524: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(val, "libvirt", sizeof(val));
data/fence-virt-1.0.0/server/config.c:564: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(val, "multicast", sizeof(val));
data/fence-virt-1.0.0/server/config.c:627:14:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	old_umask = umask(077);
data/fence-virt-1.0.0/server/config.c:629:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(old_umask);
data/fence-virt-1.0.0/server/config.c:658: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(tmp_filename))
data/fence-virt-1.0.0/server/cpg-virt.c:234: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(req->vm_name)) {
data/fence-virt-1.0.0/server/cpg-virt.c:252: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(req->vm_name)) {
data/fence-virt-1.0.0/server/cpg-virt.c:349: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(vm_name) >= sizeof(freq.vm_name)) {
data/fence-virt-1.0.0/server/daemon_init.c:89:21:  [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).
	s = &(proc_cmdline[strlen(proc_cmdline)]);
data/fence-virt-1.0.0/server/daemon_init.c:149:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(pid_filename, filename, PATH_MAX - 1);
data/fence-virt-1.0.0/server/daemon_init.c:222: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(pid_filename))
data/fence-virt-1.0.0/server/mcast.c:201:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char *)hinfo.domain, vm_name, sizeof(hinfo.domain) - 1);
data/fence-virt-1.0.0/server/mcast.c:202:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char *)hinfo.uuid, vm_uuid, sizeof(hinfo.uuid) - 1);
data/fence-virt-1.0.0/server/serial.c:127:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char *)hinfo.domain, vm_name, sizeof(hinfo.domain) - 1);
data/fence-virt-1.0.0/server/serial.c:128:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char *)hinfo.uuid, vm_uuid, sizeof(hinfo.uuid) - 1);
data/fence-virt-1.0.0/server/static_map.c:138:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(group->name, value, sizeof(group->name));
data/fence-virt-1.0.0/server/static_map.c:155:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(entry->name, value, sizeof(entry->name));
data/fence-virt-1.0.0/server/static_map.c:175:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(entry->name, value, sizeof(entry->name));
data/fence-virt-1.0.0/server/tcp.c:122:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char *)hinfo.domain, vm_name, sizeof(hinfo.domain) - 1);
data/fence-virt-1.0.0/server/tcp.c:123:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char *)hinfo.uuid, vm_uuid, sizeof(hinfo.uuid) - 1);
data/fence-virt-1.0.0/server/uuid-test.c:13: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(value) < 36) {
data/fence-virt-1.0.0/server/virt-serial.c:56:11:  [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).
	dirlen = strlen(dir);
data/fence-virt-1.0.0/server/virt-serial.c:57: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).
	pathlen = strlen(pathspec);
data/fence-virt-1.0.0/server/virt-serial.c:127: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).
	doc = xmlParseMemory(xml, strlen(xml));
data/fence-virt-1.0.0/server/virt-sockets.c:94:27:  [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).
	sun_len = sizeof(*sun) + strlen(socket_path) + 1;
data/fence-virt-1.0.0/server/virt-sockets.c:101:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(sun->sun_path, socket_path, sizeof(sun->sun_path) - 1);
data/fence-virt-1.0.0/server/virt.c:125:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(vl->vm_states[x].v_name, d_name, MAX_DOMAINNAME_LENGTH);
data/fence-virt-1.0.0/server/virt.c:126:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(vl->vm_states[x].v_uuid, d_uuid, MAX_DOMAINNAME_LENGTH);
data/fence-virt-1.0.0/server/virt.c:221: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(vm->v_uuid) > 0)
data/fence-virt-1.0.0/server/virt.c:224:19:  [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 (v == NULL && strlen(vm->v_name) > 0)
data/fence-virt-1.0.0/server/vsock.c:154:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char *)hinfo.domain, vm_name, sizeof(hinfo.domain) - 1);
data/fence-virt-1.0.0/server/vsock.c:155:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char *)hinfo.uuid, vm_uuid, sizeof(hinfo.uuid) - 1);

ANALYSIS SUMMARY:

Hits = 234
Lines analyzed = 14408 in approximately 0.42 seconds (34365 lines/second)
Physical Source Lines of Code (SLOC) = 10639
Hits@level = [0] 384 [1]  84 [2] 139 [3]   5 [4]   6 [5]   0
Hits@level+ = [0+] 618 [1+] 234 [2+] 150 [3+]  11 [4+]   6 [5+]   0
Hits/KSLOC@level+ = [0+] 58.0882 [1+] 21.9945 [2+] 14.0991 [3+] 1.03393 [4+] 0.563963 [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.