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/dlm-4.0.9/dlm_controld/action.c
Examining data/dlm-4.0.9/dlm_controld/config.c
Examining data/dlm-4.0.9/dlm_controld/cpg.c
Examining data/dlm-4.0.9/dlm_controld/crc.c
Examining data/dlm-4.0.9/dlm_controld/daemon_cpg.c
Examining data/dlm-4.0.9/dlm_controld/deadlock.c
Examining data/dlm-4.0.9/dlm_controld/dlm_controld.h
Examining data/dlm-4.0.9/dlm_controld/dlm_daemon.h
Examining data/dlm-4.0.9/dlm_controld/fence.c
Examining data/dlm-4.0.9/dlm_controld/fence_config.c
Examining data/dlm-4.0.9/dlm_controld/fence_config.h
Examining data/dlm-4.0.9/dlm_controld/helper.c
Examining data/dlm-4.0.9/dlm_controld/lib.c
Examining data/dlm-4.0.9/dlm_controld/libdlmcontrol.h
Examining data/dlm-4.0.9/dlm_controld/linux_endian.h
Examining data/dlm-4.0.9/dlm_controld/list.h
Examining data/dlm-4.0.9/dlm_controld/logging.c
Examining data/dlm-4.0.9/dlm_controld/main.c
Examining data/dlm-4.0.9/dlm_controld/member.c
Examining data/dlm-4.0.9/dlm_controld/netlink.c
Examining data/dlm-4.0.9/dlm_controld/plock.c
Examining data/dlm-4.0.9/dlm_controld/rbtree.c
Examining data/dlm-4.0.9/dlm_controld/rbtree.h
Examining data/dlm-4.0.9/dlm_tool/main.c
Examining data/dlm-4.0.9/fence/stonith_helper.c
Examining data/dlm-4.0.9/libdlm/libdlm.c
Examining data/dlm-4.0.9/libdlm/libdlm.h
Examining data/dlm-4.0.9/libdlm/libdlm_internal.h

FINAL RESULTS:

data/dlm-4.0.9/dlm_controld/action.c:118:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fname, "%s/%s/%s", DLM_SYSFS_DIR, name, file);
data/dlm-4.0.9/dlm_controld/action.c:450:2:  [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, PATH_MAX, COMMS_DIR);
data/dlm-4.0.9/dlm_controld/config.c:71:3:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		sscanf(line, "master %s %[^\n]s", name, args);
data/dlm-4.0.9/dlm_controld/config.c:129:3:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		sscanf(line, "lockspace %s %[^\n]s", name, args);
data/dlm-4.0.9/dlm_controld/config.c:152:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	rv = sscanf(line, "%[^=]=%s", key, val);
data/dlm-4.0.9/dlm_controld/config.c:165:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	rv = sscanf(line, "%[^=]=%s", key, val);
data/dlm-4.0.9/dlm_controld/config.c:169: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(val_out, val);
data/dlm-4.0.9/dlm_controld/cpg.c:1706:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(name, "dlm:ls:%s", ls->name);
data/dlm-4.0.9/dlm_controld/cpg.c:1773:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(name.value, "dlm:ls:%s", ls->name);
data/dlm-4.0.9/dlm_controld/cpg.c:1818:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(name.value, "dlm:ls:%s", ls->name);
data/dlm-4.0.9/dlm_controld/fence.c:71:3:  [4] (shell) execlp:
  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.
		execlp(agent, agent, NULL);
data/dlm-4.0.9/dlm_controld/fence_config.c:127:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	rv = sscanf(dev_line, "%s %s %s %[^\n]s\n", unused, dev_name, agent, dev_args);
data/dlm-4.0.9/dlm_controld/fence_config.c:160:3:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		sscanf(line, "%s %s %[^\n]s", unused, con_name, con_args);
data/dlm-4.0.9/dlm_controld/fence_config.c:256:9:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
			rv = sscanf(line, "%s %s %[^\n]s\n", dev->name, dev->agent, dev->args);
data/dlm-4.0.9/dlm_controld/fence_config.c:441:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(args, node);
data/dlm-4.0.9/dlm_controld/fence_config.c:443:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(args, extra);
data/dlm-4.0.9/dlm_controld/helper.c:221:2:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	execvp(av[0], av);
data/dlm-4.0.9/dlm_controld/lib.c:72: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(&sun.sun_path[1], sock_path);
data/dlm-4.0.9/dlm_controld/logging.c:22: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(logfile, DEFAULT_LOGFILE);
data/dlm-4.0.9/dlm_controld/logging.c:149:8:  [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.
	ret = vsnprintf(log_str + pos, len - pos, fmt, ap);
data/dlm-4.0.9/dlm_controld/main.c:825:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ret = sprintf(buf + pos, "%s", tmp);
data/dlm-4.0.9/dlm_controld/main.c:835:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ret = sprintf(buf + pos, "%s", tmp);
data/dlm-4.0.9/dlm_controld/main.c:891:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ret = sprintf(buf + pos, "%s", tmp);
data/dlm-4.0.9/dlm_controld/main.c:1227: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(&addr.sun_path[1], sock_path);
data/dlm-4.0.9/dlm_controld/netlink.c:90: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(genl_name, DLM_GENL_NAME);
data/dlm-4.0.9/dlm_tool/main.c:462:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(run_command, argv[i]);
data/dlm-4.0.9/dlm_tool/main.c:576:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buf,
data/dlm-4.0.9/dlm_tool/main.c:591:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	rv = sscanf(line, "%s %s %d %s %u %d %d %u %u %s",
data/dlm-4.0.9/dlm_tool/main.c:648:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	rv = sscanf(line, "%s %u %d %[0-9A-Fa-f ]", type, &lvbseq, &lvblen, lvb);
data/dlm-4.0.9/dlm_tool/main.c:696:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buf, "(%s)", mode_str(lkb->rqmode));
data/dlm-4.0.9/dlm_tool/main.c:753:2:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	sscanf(line, "%s %x %d %x %u %llu %x %x %d %d %d %d %d %d %u %llu %llu",
data/dlm-4.0.9/dlm_tool/main.c:825:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	rv = sscanf(line, "%s %s %d %d %d %d %s %u %u %s",
data/dlm-4.0.9/dlm_tool/main.c:1216:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(str, i++ ? "," : "");
data/dlm-4.0.9/dlm_tool/main.c:1220:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(str, i++ ? "," : "");
data/dlm-4.0.9/dlm_tool/main.c:1224:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(str, i++ ? "," : "");
data/dlm-4.0.9/dlm_tool/main.c:1228:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(str, i++ ? "," : "");
data/dlm-4.0.9/dlm_tool/main.c:1232:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(str, i++ ? "," : "");
data/dlm-4.0.9/fence/stonith_helper.c:44:9:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
			rv = sscanf(arg, "%[^=]=%s\n", key, val);
data/dlm-4.0.9/libdlm/libdlm.c:119:2:  [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(devname, devlen, DLM_MISC_PREFIX "%s", lsname);
data/dlm-4.0.9/libdlm/libdlm.c:354:7:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		if (fscanf(f, "%d %s", &m, name) != 2)
data/dlm-4.0.9/libdlm/libdlm.c:423:2:  [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(bname, PATH_MAX, DLM_PREFIX "%s", lockspace);
data/dlm-4.0.9/libdlm/libdlm.c:448:4:  [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(tmp_path, PATH_MAX, MISC_PREFIX "%s",
data/dlm-4.0.9/dlm_controld/main.c:2000:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (getenv("DLM_CONTROLD_DEBUG")) {
data/dlm-4.0.9/dlm_tool/main.c:231:13:  [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.
		optchar = getopt(argc, argv, OPTION_STRING);
data/dlm-4.0.9/fence/stonith_helper.c:32:15:  [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 ((c = getopt(argc, argv, "n:t:")) != -1) {
data/dlm-4.0.9/dlm_controld/action.c:115: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 fname[512];
data/dlm-4.0.9/dlm_controld/action.c:120: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(fname, O_WRONLY);
data/dlm-4.0.9/dlm_controld/action.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 buf[32];
data/dlm-4.0.9/dlm_controld/action.c:145: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[32];
data/dlm-4.0.9/dlm_controld/action.c:155:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[32];
data/dlm-4.0.9/dlm_controld/action.c:165: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[32];
data/dlm-4.0.9/dlm_controld/action.c:175: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[PATH_MAX];
data/dlm-4.0.9/dlm_controld/action.c:197:22:  [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).
		dir_members[i++] = atoi(de->d_name);
data/dlm-4.0.9/dlm_controld/action.c:251: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[PATH_MAX];
data/dlm-4.0.9/dlm_controld/action.c:252: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[32];
data/dlm-4.0.9/dlm_controld/action.c:361:13:  [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).
		rv = fd = open(path, O_WRONLY);
data/dlm-4.0.9/dlm_controld/action.c:388:13:  [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).
		rv = fd = open(path, O_WRONLY);
data/dlm-4.0.9/dlm_controld/action.c:414: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 ip[256];
data/dlm-4.0.9/dlm_controld/action.c:424: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 str_ip_buf[INET6_ADDRSTRLEN];
data/dlm-4.0.9/dlm_controld/action.c:444: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[PATH_MAX];
data/dlm-4.0.9/dlm_controld/action.c:464:22:  [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).
		comms_nodes[i++] = atoi(de->d_name);
data/dlm-4.0.9/dlm_controld/action.c:476: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[PATH_MAX];
data/dlm-4.0.9/dlm_controld/action.c:497: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[PATH_MAX];
data/dlm-4.0.9/dlm_controld/action.c:521: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[PATH_MAX];
data/dlm-4.0.9/dlm_controld/action.c:575: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[PATH_MAX];
data/dlm-4.0.9/dlm_controld/action.c:576: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 padded_addr[sizeof(struct sockaddr_storage)];
data/dlm-4.0.9/dlm_controld/action.c:577: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[32];
data/dlm-4.0.9/dlm_controld/action.c:601: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(path, O_WRONLY);
data/dlm-4.0.9/dlm_controld/action.c:623: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(padded_addr, addr, addrlen);
data/dlm-4.0.9/dlm_controld/action.c:628: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(path, O_WRONLY);
data/dlm-4.0.9/dlm_controld/action.c:652: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(path, O_WRONLY);
data/dlm-4.0.9/dlm_controld/action.c:670:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(path, O_WRONLY);
data/dlm-4.0.9/dlm_controld/action.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 path[PATH_MAX];
data/dlm-4.0.9/dlm_controld/action.c:707: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[PATH_MAX];
data/dlm-4.0.9/dlm_controld/action.c:708: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[32];
data/dlm-4.0.9/dlm_controld/action.c:715: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(path, O_WRONLY);
data/dlm-4.0.9/dlm_controld/action.c:744: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[PATH_MAX];
data/dlm-4.0.9/dlm_controld/action.c:745: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[32];
data/dlm-4.0.9/dlm_controld/action.c:751: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(path, O_RDWR);
data/dlm-4.0.9/dlm_controld/action.c:766:6:  [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(buf) >= NET_RMEM_DEFAULT) {
data/dlm-4.0.9/dlm_controld/action.c:788: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(path, O_RDWR);
data/dlm-4.0.9/dlm_controld/action.c:803:6:  [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(buf) >= NET_RMEM_MAX) {
data/dlm-4.0.9/dlm_controld/action.c:913: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/dlm-4.0.9/dlm_controld/action.c:922:13:  [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).
	if (!(fl = fopen("/proc/misc", "r"))) {
data/dlm-4.0.9/dlm_controld/config.c:49: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 line[MAX_LINE];
data/dlm-4.0.9/dlm_controld/config.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 name[MAX_LINE];
data/dlm-4.0.9/dlm_controld/config.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 args[MAX_LINE];
data/dlm-4.0.9/dlm_controld/config.c:103: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 line[MAX_LINE];
data/dlm-4.0.9/dlm_controld/config.c:104: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[MAX_LINE];
data/dlm-4.0.9/dlm_controld/config.c:105: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 args[MAX_LINE];
data/dlm-4.0.9/dlm_controld/config.c:112:9:  [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).
	file = fopen(CONF_FILE_PATH, "r");
data/dlm-4.0.9/dlm_controld/config.c:148: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_LINE];
data/dlm-4.0.9/dlm_controld/config.c:149: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[MAX_LINE];
data/dlm-4.0.9/dlm_controld/config.c:156:13:  [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).
	*val_out = atoi(val);
data/dlm-4.0.9/dlm_controld/config.c:161: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_LINE];
data/dlm-4.0.9/dlm_controld/config.c:162: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[MAX_LINE];
data/dlm-4.0.9/dlm_controld/config.c:176: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 line[MAX_LINE];
data/dlm-4.0.9/dlm_controld/config.c:177:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char str[MAX_LINE];
data/dlm-4.0.9/dlm_controld/config.c:183:9:  [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).
	file = fopen(CONF_FILE_PATH, "r");
data/dlm-4.0.9/dlm_controld/cpg.c:1697: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/dlm-4.0.9/dlm_controld/daemon_cpg.c:61: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 unused[1000];
data/dlm-4.0.9/dlm_controld/daemon_cpg.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 m_buf[128];
data/dlm-4.0.9/dlm_controld/daemon_cpg.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 j_buf[32];
data/dlm-4.0.9/dlm_controld/daemon_cpg.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 l_buf[32];
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:185: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 m_buf[128];
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:618: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(node->fence_actors_orig, node->fence_actors, sizeof(node->fence_actors));
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:1682: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(&proto->daemon_run, &mind, sizeof(mind));
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:1683: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(&proto->kernel_run, &mink, sizeof(mink));
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:1834: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(&node->proto, p, sizeof(struct protocol));
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:1884: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(pr, proto, sizeof(struct protocol));
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:1914: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(&proto, &our_protocol, sizeof(struct protocol));
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:2172: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(run->uuid, req->uuid, RUN_UUID_LEN);
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:2173: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(run->command, req->command, RUN_COMMAND_LEN);
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:2503:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(name.value, "dlm:controld");
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:2541:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(name.value, "dlm:controld");
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:2613:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char str[DLMC_STATE_MAXSTR];
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:2636:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char str[DLMC_STATE_MAXSTR];
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:2687:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char str[DLMC_STATE_MAXSTR];
data/dlm-4.0.9/dlm_controld/deadlock.c:15: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 section_buf[10 * 1024 * 1024];  /* 10MB of pack_lock's enough? */
data/dlm-4.0.9/dlm_controld/deadlock.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			name[DLM_RESNAME_MAXLEN];
data/dlm-4.0.9/dlm_controld/deadlock.c:182: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(r->name, name, len);
data/dlm-4.0.9/dlm_controld/deadlock.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 path[PATH_MAX];
data/dlm-4.0.9/dlm_controld/deadlock.c:348: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 line[LOCK_LINE_MAX];
data/dlm-4.0.9/dlm_controld/deadlock.c:351: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 r_name[65];
data/dlm-4.0.9/dlm_controld/deadlock.c:360:9:  [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).
	file = fopen(path, "r");
data/dlm-4.0.9/dlm_controld/deadlock.c:572: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[DLM_RESNAME_MAXLEN];
data/dlm-4.0.9/dlm_controld/deadlock.c:701: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[DLM_RESNAME_MAXLEN];
data/dlm-4.0.9/dlm_controld/dlm_controld.h:48: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[DLM_LOCKSPACE_LEN]; /* no terminating null space */
data/dlm-4.0.9/dlm_controld/dlm_daemon.h:183: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.
EXTERN char cluster_name[DLM_LOCKSPACE_LEN+1];
data/dlm-4.0.9/dlm_controld/dlm_daemon.h:250: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[DLM_LOCKSPACE_LEN+1];
data/dlm-4.0.9/dlm_controld/dlm_daemon.h:334:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char uuid[RUN_UUID_LEN];
data/dlm-4.0.9/dlm_controld/dlm_daemon.h:335: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 command[RUN_COMMAND_LEN];
data/dlm-4.0.9/dlm_controld/dlm_daemon.h:343:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char uuid[RUN_UUID_LEN];
data/dlm-4.0.9/dlm_controld/dlm_daemon.h:344: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 command[RUN_COMMAND_LEN];
data/dlm-4.0.9/dlm_controld/dlm_daemon.h:350:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char uuid[RUN_UUID_LEN];
data/dlm-4.0.9/dlm_controld/fence.c:55: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).
		c_stdout = open("/dev/null", O_WRONLY);
data/dlm-4.0.9/dlm_controld/fence.c:59: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).
		c_stderr = open("/dev/null", O_WRONLY);
data/dlm-4.0.9/dlm_controld/fence.c:84: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 args[FENCE_CONFIG_ARGS_MAX];
data/dlm-4.0.9/dlm_controld/fence.c:85: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 extra[FENCE_CONFIG_NAME_MAX];
data/dlm-4.0.9/dlm_controld/fence.c:183:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char args[FENCE_CONFIG_ARGS_MAX];
data/dlm-4.0.9/dlm_controld/fence.c:184: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 action[FENCE_CONFIG_NAME_MAX];
data/dlm-4.0.9/dlm_controld/fence_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 line[MAX_LINE];
data/dlm-4.0.9/dlm_controld/fence_config.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 unused[FENCE_CONFIG_NAME_MAX];
data/dlm-4.0.9/dlm_controld/fence_config.c:113: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 agent[FENCE_CONFIG_NAME_MAX];
data/dlm-4.0.9/dlm_controld/fence_config.c:114: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 dev_name[FENCE_CONFIG_NAME_MAX];
data/dlm-4.0.9/dlm_controld/fence_config.c:115: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 con_name[FENCE_CONFIG_NAME_MAX];
data/dlm-4.0.9/dlm_controld/fence_config.c:116: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 dev_args[FENCE_CONFIG_ARGS_MAX];
data/dlm-4.0.9/dlm_controld/fence_config.c:117:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char con_args[FENCE_CONFIG_ARGS_MAX];
data/dlm-4.0.9/dlm_controld/fence_config.c:223: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 line[MAX_LINE];
data/dlm-4.0.9/dlm_controld/fence_config.c:232:9:  [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).
	file = fopen(path, "r");
data/dlm-4.0.9/dlm_controld/fence_config.c:392: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 node[FENCE_CONFIG_NAME_MAX];
data/dlm-4.0.9/dlm_controld/fence_config.h:17: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[FENCE_CONFIG_NAME_MAX];
data/dlm-4.0.9/dlm_controld/fence_config.h:18: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 agent[FENCE_CONFIG_NAME_MAX];
data/dlm-4.0.9/dlm_controld/fence_config.h: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 args[FENCE_CONFIG_ARGS_MAX];
data/dlm-4.0.9/dlm_controld/fence_config.h:24: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[FENCE_CONFIG_NAME_MAX];
data/dlm-4.0.9/dlm_controld/fence_config.h:25: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 args[FENCE_CONFIG_ARGS_MAX];
data/dlm-4.0.9/dlm_controld/helper.c:79:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char uuid[RUN_UUID_LEN];
data/dlm-4.0.9/dlm_controld/helper.c:95: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(running_cmds[i].uuid, uuid, RUN_UUID_LEN);
data/dlm-4.0.9/dlm_controld/helper.c:138: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 cmd_buf[16];
data/dlm-4.0.9/dlm_controld/helper.c:139: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 arg[ONE_ARG_LEN];
data/dlm-4.0.9/dlm_controld/helper.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 *av[MAX_AV_COUNT + 1]; /* +1 for NULL */
data/dlm-4.0.9/dlm_controld/helper.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(rep.uuid, running->uuid, RUN_UUID_LEN);
data/dlm-4.0.9/dlm_controld/helper.c:283: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 cmd_buf[16];
data/dlm-4.0.9/dlm_controld/lib.c:98: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 copy_buf[DLMC_DUMP_SIZE];
data/dlm-4.0.9/dlm_controld/lib.c:134: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(buf, copy_buf, len);
data/dlm-4.0.9/dlm_controld/lib.c:194: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 valstr[64];
data/dlm-4.0.9/dlm_controld/lib.c:224: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 valstr[64];
data/dlm-4.0.9/dlm_controld/lib.c:343: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 maxstr[DLMC_STATE_MAXSTR];
data/dlm-4.0.9/dlm_controld/lib.c:344: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 maxbin[DLMC_STATE_MAXBIN];
data/dlm-4.0.9/dlm_controld/lib.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 *node_lines[MAX_SORT];
data/dlm-4.0.9/dlm_controld/lib.c:353: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 *fence_lines[MAX_SORT];
data/dlm-4.0.9/dlm_controld/lib.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 reply[sizeof(struct dlmc_header) + sizeof(struct dlmc_node)];
data/dlm-4.0.9/dlm_controld/lib.c:559: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(node, (char *)reply + sizeof(struct dlmc_header),
data/dlm-4.0.9/dlm_controld/lib.c:570: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 reply[sizeof(struct dlmc_header) + sizeof(struct dlmc_lockspace)];
data/dlm-4.0.9/dlm_controld/lib.c:596: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(lockspace, (char *)reply + sizeof(struct dlmc_header),
data/dlm-4.0.9/dlm_controld/lib.c:652: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(lss, (char *)reply + sizeof(struct dlmc_header),
data/dlm-4.0.9/dlm_controld/lib.c:710: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(nodes, (char *)reply + sizeof(struct dlmc_header),
data/dlm-4.0.9/dlm_controld/lib.c:863: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(run_uuid, rh.name, DLMC_RUN_UUID_LEN);
data/dlm-4.0.9/dlm_controld/libdlmcontrol.h:58: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[DLM_LOCKSPACE_LEN+1];
data/dlm-4.0.9/dlm_controld/logging.c:14: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 logfile[PATH_MAX];
data/dlm-4.0.9/dlm_controld/logging.c:31:16:  [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).
		logfile_fp = fopen(logfile, "a+");
data/dlm-4.0.9/dlm_controld/logging.c:50: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 log_str[LOG_STR_LEN];
data/dlm-4.0.9/dlm_controld/logging.c:52: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 log_dump[LOG_DUMP_SIZE];
data/dlm-4.0.9/dlm_controld/logging.c:56: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 log_dump_plock[LOG_DUMP_SIZE];
data/dlm-4.0.9/dlm_controld/logging.c:71: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(buf, log_buf + p, tail_len);
data/dlm-4.0.9/dlm_controld/logging.c:73: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(buf+tail_len, log_buf, p);
data/dlm-4.0.9/dlm_controld/logging.c:76: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(buf, log_buf, p-1);
data/dlm-4.0.9/dlm_controld/logging.c:99: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(log_buf + p, log_str, len);
data/dlm-4.0.9/dlm_controld/logging.c:125: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[NAME_ID_SIZE + 2];
data/dlm-4.0.9/dlm_controld/logging.c:170: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[64];
data/dlm-4.0.9/dlm_controld/main.c:266: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(req.uuid, run->uuid, RUN_UUID_LEN);
data/dlm-4.0.9/dlm_controld/main.c:368: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(&send_reply.info, &run->info, sizeof(struct run_info));
data/dlm-4.0.9/dlm_controld/main.c:369: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(send_reply.uuid, run->uuid, RUN_UUID_LEN);
data/dlm-4.0.9/dlm_controld/main.c:449: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(&req.info, &run->info, sizeof(struct run_info));
data/dlm-4.0.9/dlm_controld/main.c:450: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(req.uuid, run->uuid, RUN_UUID_LEN);
data/dlm-4.0.9/dlm_controld/main.c:457: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(uuid_out, run->uuid, RUN_UUID_LEN);
data/dlm-4.0.9/dlm_controld/main.c:479: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 nodes_buf[128];
data/dlm-4.0.9/dlm_controld/main.c:590: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[DLM_LOCKSPACE_LEN+1];
data/dlm-4.0.9/dlm_controld/main.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 buf[MAX_LINE_UEVENT];
data/dlm-4.0.9/dlm_controld/main.c:691: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 *argv[MAXARGS], *act, *sys;
data/dlm-4.0.9/dlm_controld/main.c:806: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 copy_buf[LOG_DUMP_SIZE];
data/dlm-4.0.9/dlm_controld/main.c:810: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[1024];
data/dlm-4.0.9/dlm_controld/main.c:875: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[256];
data/dlm-4.0.9/dlm_controld/main.c:969: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(reply + sizeof(struct dlmc_header), buf, buflen);
data/dlm-4.0.9/dlm_controld/main.c:1085:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char uuid_str[RUN_UUID_LEN];
data/dlm-4.0.9/dlm_controld/main.c:1127:18:  [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).
		fence_ack_node(atoi(h.name));
data/dlm-4.0.9/dlm_controld/main.c:1359:22:  [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).
	kernel_monitor_fd = open("/dev/misc/dlm-monitor", O_RDONLY);
data/dlm-4.0.9/dlm_controld/main.c:1557: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[PATH_MAX];
data/dlm-4.0.9/dlm_controld/main.c:1558: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[16];
data/dlm-4.0.9/dlm_controld/main.c:1573: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(path, O_CREAT|O_WRONLY|O_CLOEXEC, 0644);
data/dlm-4.0.9/dlm_controld/main.c:1617: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[PATH_MAX];
data/dlm-4.0.9/dlm_controld/main.c:1833: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[PATH_MAX];
data/dlm-4.0.9/dlm_controld/main.c:1879: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 bundled_letters[8];
data/dlm-4.0.9/dlm_controld/main.c:1970: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).
			o->cli_int = atoi(arg_str);
data/dlm-4.0.9/dlm_controld/main.c:1973: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).
			o->cli_int = atoi(arg_str) ? 1 : 0;
data/dlm-4.0.9/dlm_controld/main.c:2042:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(fence_all_device.name, "fence_all");
data/dlm-4.0.9/dlm_controld/main.c:2043:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(fence_all_device.agent, "dlm_stonith");
data/dlm-4.0.9/dlm_controld/member.c:348: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[CMAP_KEYNAME_MAXLEN+1];
data/dlm-4.0.9/dlm_controld/netlink.c:30: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[MAX_MSG_SIZE];
data/dlm-4.0.9/dlm_controld/netlink.c:55: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(NLA_DATA(na), nla_data, nla_len);
data/dlm-4.0.9/dlm_controld/netlink.c:79: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 genl_name[100];
data/dlm-4.0.9/dlm_controld/netlink.c:83: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 buf[256];
data/dlm-4.0.9/dlm_controld/plock.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 buf[0];
data/dlm-4.0.9/dlm_controld/plock.c:173:21:  [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).
		plock_device_fd = open("/dev/misc/dlm_plock", O_RDWR);
data/dlm-4.0.9/dlm_controld/plock.c:682: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(&w->info, in, sizeof(struct dlm_plock_info));
data/dlm-4.0.9/dlm_controld/plock.c:804: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(&sm->buf, hd, len);
data/dlm-4.0.9/dlm_controld/plock.c:995: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(buf + sizeof(struct dlm_header), in, sizeof(*in));
data/dlm-4.0.9/dlm_controld/plock.c:1098: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(&w->info, in, sizeof(struct dlm_plock_info));
data/dlm-4.0.9/dlm_controld/plock.c:1654: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 send_buf[MAX_SEND_SIZE];
data/dlm-4.0.9/dlm_tool/main.c:65:1:  [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 run_command[DLMC_RUN_COMMAND_LEN];
data/dlm-4.0.9/dlm_tool/main.c:66:1:  [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 run_uuid[DLMC_RUN_UUID_LEN];
data/dlm-4.0.9/dlm_tool/main.c:228: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 modebuf[8];
data/dlm-4.0.9/dlm_tool/main.c:235: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).
			opt_excl = atoi(optarg);
data/dlm-4.0.9/dlm_tool/main.c:239:13:  [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).
			opt_fs = atoi(optarg);
data/dlm-4.0.9/dlm_tool/main.c:269: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).
			wait_sec = atoi(optarg);
data/dlm-4.0.9/dlm_tool/main.c:488: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 join_flags[128];
data/dlm-4.0.9/dlm_tool/main.c:492:2:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	strcat(join_flags, "flags ");
data/dlm-4.0.9/dlm_tool/main.c:495:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(join_flags, "NEWEXCL ");
data/dlm-4.0.9/dlm_tool/main.c:498:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(join_flags, "FS ");
data/dlm-4.0.9/dlm_tool/main.c:550:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[64];
data/dlm-4.0.9/dlm_tool/main.c:555:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buf, "Master:%d", nodeid);
data/dlm-4.0.9/dlm_tool/main.c:557:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buf, "Master");
data/dlm-4.0.9/dlm_tool/main.c:559:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buf, "Lookup");
data/dlm-4.0.9/dlm_tool/main.c:567:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[128];
data/dlm-4.0.9/dlm_tool/main.c:585: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[4], namefmt[4], *p;
data/dlm-4.0.9/dlm_tool/main.c:586: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 addr[64];
data/dlm-4.0.9/dlm_tool/main.c:587: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 first_lkid[64];
data/dlm-4.0.9/dlm_tool/main.c:641: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 lvb[1024];
data/dlm-4.0.9/dlm_tool/main.c:642: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[4];
data/dlm-4.0.9/dlm_tool/main.c:687:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[5];
data/dlm-4.0.9/dlm_tool/main.c:705:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[64];
data/dlm-4.0.9/dlm_tool/main.c:712:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buf, "Remote: %3d %08x", lkb->nodeid, lkb->remid);
data/dlm-4.0.9/dlm_tool/main.c:715:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buf, "Master: %3d %08x", lkb->nodeid, lkb->remid);
data/dlm-4.0.9/dlm_tool/main.c:722:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[16];
data/dlm-4.0.9/dlm_tool/main.c:729:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buf, " wait %02d", lkb->wait_type);
data/dlm-4.0.9/dlm_tool/main.c:736:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char buf[128];
data/dlm-4.0.9/dlm_tool/main.c:740:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(buf, "time %016llu flags %08x %08x bast %d %llu pid %d",
data/dlm-4.0.9/dlm_tool/main.c:751: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[4];
data/dlm-4.0.9/dlm_tool/main.c:818: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[4], namefmt[4], *p;
data/dlm-4.0.9/dlm_tool/main.c:819: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 addr[64];
data/dlm-4.0.9/dlm_tool/main.c:820: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 toss_time[16];
data/dlm-4.0.9/dlm_tool/main.c:953: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[PATH_MAX];
data/dlm-4.0.9/dlm_tool/main.c:954: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 line[LOCK_LINE_MAX];
data/dlm-4.0.9/dlm_tool/main.c:955: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 rname[DLM_RESNAME_MAXLEN+1];
data/dlm-4.0.9/dlm_tool/main.c:963:9:  [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).
	file = fopen(path, "r");
data/dlm-4.0.9/dlm_tool/main.c:1010: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[PATH_MAX];
data/dlm-4.0.9/dlm_tool/main.c:1011: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 line[LOCK_LINE_MAX];
data/dlm-4.0.9/dlm_tool/main.c:1015:9:  [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).
	file = fopen(path, "r");
data/dlm-4.0.9/dlm_tool/main.c:1037: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[PATH_MAX];
data/dlm-4.0.9/dlm_tool/main.c:1038: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 line[LOCK_LINE_MAX];
data/dlm-4.0.9/dlm_tool/main.c:1043:9:  [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).
	file = fopen(path, "r");
data/dlm-4.0.9/dlm_tool/main.c:1046:10:  [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).
		file = fopen(path, "r");
data/dlm-4.0.9/dlm_tool/main.c:1122: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[PATH_MAX];
data/dlm-4.0.9/dlm_tool/main.c:1123: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 line[LOCK_LINE_MAX];
data/dlm-4.0.9/dlm_tool/main.c:1124: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 r_name[DLM_RESNAME_MAXLEN+1];
data/dlm-4.0.9/dlm_tool/main.c:1142:9:  [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).
	file = fopen(path, "r");
data/dlm-4.0.9/dlm_tool/main.c:1206: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 str[128];
data/dlm-4.0.9/dlm_tool/main.c:1213:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(str, "save_plock");
data/dlm-4.0.9/dlm_tool/main.c:1217:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(str, "need_plock");
data/dlm-4.0.9/dlm_tool/main.c:1221:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(str, "fs_reg");
data/dlm-4.0.9/dlm_tool/main.c:1225:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(str, "kern_stop");
data/dlm-4.0.9/dlm_tool/main.c:1229:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(str, "leave");
data/dlm-4.0.9/dlm_tool/main.c:1233:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(str, "join");
data/dlm-4.0.9/dlm_tool/main.c:1241: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 _check_str[32];
data/dlm-4.0.9/dlm_tool/main.c:1434: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[DLMC_DUMP_SIZE];
data/dlm-4.0.9/dlm_tool/main.c:1447: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[DLMC_DUMP_SIZE];
data/dlm-4.0.9/dlm_tool/main.c:1466: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[DLMC_DUMP_SIZE];
data/dlm-4.0.9/fence/stonith_helper.c:25: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 arg[MAX_ARG_LEN];
data/dlm-4.0.9/fence/stonith_helper.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 key[MAX_ARG_LEN];
data/dlm-4.0.9/fence/stonith_helper.c:27: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[MAX_ARG_LEN];
data/dlm-4.0.9/fence/stonith_helper.c:35:14:  [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).
				nodeid = atoi(optarg);
data/dlm-4.0.9/fence/stonith_helper.c:49:14:  [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).
				nodeid = atoi(val);
data/dlm-4.0.9/libdlm/libdlm.c:59: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 lvb[DLM_USER_LVB_LEN];
data/dlm-4.0.9/libdlm/libdlm.c:60: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[0];
data/dlm-4.0.9/libdlm/libdlm.c:346: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/dlm-4.0.9/libdlm/libdlm.c:349: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("/proc/misc", "r");
data/dlm-4.0.9/libdlm/libdlm.c:397:15:  [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).
	control_fd = open(DLM_CONTROL_PATH, O_RDWR);
data/dlm-4.0.9/libdlm/libdlm.c:414: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 bname[PATH_MAX];
data/dlm-4.0.9/libdlm/libdlm.c:415: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_path[PATH_MAX];
data/dlm-4.0.9/libdlm/libdlm.c:474: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 resultbuf[sizeof(struct dlm_lock_result_v5) + DLM_USER_LVB_LEN];
data/dlm-4.0.9/libdlm/libdlm.c:508: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(result->user_lksb, &result->lksb,
data/dlm-4.0.9/libdlm/libdlm.c:517: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(result->user_lksb->sb_lvbptr,
data/dlm-4.0.9/libdlm/libdlm.c:534: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 resultbuf[sizeof(struct dlm_lock_result) + DLM_USER_LVB_LEN];
data/dlm-4.0.9/libdlm/libdlm.c:544: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(result->user_lksb, &result->lksb,
data/dlm-4.0.9/libdlm/libdlm.c:549: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(result->user_lksb->sb_lvbptr,
data/dlm-4.0.9/libdlm/libdlm.c:720: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 parambuf[sizeof(struct dlm_write_request_v5) + DLM_RESNAME_MAXLEN];
data/dlm-4.0.9/libdlm/libdlm.c:748: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(req->i.lock.name, name, namelen);
data/dlm-4.0.9/libdlm/libdlm.c:752: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(req->i.lock.lvb, lksb->sb_lvbptr, DLM_LVB_LEN);
data/dlm-4.0.9/libdlm/libdlm.c:788: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 parambuf[sizeof(struct dlm_write_request) + DLM_RESNAME_MAXLEN];
data/dlm-4.0.9/libdlm/libdlm.c:821: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(req->i.lock.name, name, namelen);
data/dlm-4.0.9/libdlm/libdlm.c:825: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(req->i.lock.lvb, lksb->sb_lvbptr, DLM_LVB_LEN);
data/dlm-4.0.9/libdlm/libdlm.c:1241: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 reqbuf[sizeof(struct dlm_write_request_v5) + DLM_LOCKSPACE_LEN];
data/dlm-4.0.9/libdlm/libdlm.c:1256: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(req->i.lspace.name, name, namelen);
data/dlm-4.0.9/libdlm/libdlm.c:1265: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 reqbuf[sizeof(struct dlm_write_request) + DLM_LOCKSPACE_LEN];
data/dlm-4.0.9/libdlm/libdlm.c:1280: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(req->i.lspace.name, name, namelen);
data/dlm-4.0.9/libdlm/libdlm.c:1290: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 dev_path[PATH_MAX];
data/dlm-4.0.9/libdlm/libdlm.c:1291: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 udev_path[PATH_MAX];
data/dlm-4.0.9/libdlm/libdlm.c:1331: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).
	newls->fd = open(dev_path, O_RDWR);
data/dlm-4.0.9/libdlm/libdlm.c:1391: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 dev_path[PATH_MAX];
data/dlm-4.0.9/libdlm/libdlm.c:1429: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(dev_path, O_RDWR);
data/dlm-4.0.9/libdlm/libdlm.c:1444: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 dev_name[PATH_MAX];
data/dlm-4.0.9/libdlm/libdlm.c:1459: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).
	newls->fd = open(dev_name, O_RDWR);
data/dlm-4.0.9/dlm_controld/action.c:74:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cluster_name, str, DLM_LOCKSPACE_LEN);
data/dlm-4.0.9/dlm_controld/action.c:128:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	rv = do_write(fd, val, strlen(val) + 1);
data/dlm-4.0.9/dlm_controld/action.c:221:14:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	old_umask = umask(0022);
data/dlm-4.0.9/dlm_controld/action.c:227:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(old_umask);
data/dlm-4.0.9/dlm_controld/action.c:370:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		rv = do_write(fd, buf, strlen(buf));
data/dlm-4.0.9/dlm_controld/action.c:397:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		rv = do_write(fd, buf, strlen(buf));
data/dlm-4.0.9/dlm_controld/action.c:610:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	rv = do_write(fd, buf, strlen(buf));
data/dlm-4.0.9/dlm_controld/action.c:658:33:  [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).
	rv = do_write(fd, (void *)"1", strlen("1"));
data/dlm-4.0.9/dlm_controld/action.c:676:34:  [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).
		rv = do_write(fd, (void *)"1", strlen("1"));
data/dlm-4.0.9/dlm_controld/action.c:729:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	rv = do_write(fd, wbuf, strlen(wbuf));
data/dlm-4.0.9/dlm_controld/action.c:759:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(fd, buf, sizeof(buf));
data/dlm-4.0.9/dlm_controld/action.c:774:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	rv = do_write(fd, buf, strlen(buf));
data/dlm-4.0.9/dlm_controld/action.c:796:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(fd, buf, sizeof(buf));
data/dlm-4.0.9/dlm_controld/action.c:811:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	rv = do_write(fd, buf, strlen(buf));
data/dlm-4.0.9/dlm_controld/action.c:928:7:  [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.
		if (fscanf(fl, "%d %255s\n", &number, &name[0]) == 2) {
data/dlm-4.0.9/dlm_controld/action.c:942:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			c = fgetc(fl);
data/dlm-4.0.9/dlm_controld/config.c:63:31:  [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 (strncmp(line, "master", strlen("master")))
data/dlm-4.0.9/dlm_controld/config.c:122:34:  [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 (strncmp(line, "lockspace", strlen("lockspace")))
data/dlm-4.0.9/dlm_controld/cpg.c:1774: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).
	name.length = strlen(name.value) + 1;
data/dlm-4.0.9/dlm_controld/cpg.c:1819: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).
	name.length = strlen(name.value) + 1;
data/dlm-4.0.9/dlm_controld/cpg.c:1867:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(lockspace->name, ls->name, DLM_LOCKSPACE_LEN);
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:278: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(1000);
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:724: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(500000);
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:2504: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).
	name.length = strlen(name.value) + 1;
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:2542: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).
	name.length = strlen(name.value) + 1;
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:2606: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).
	return strlen(str) + 1;
data/dlm-4.0.9/dlm_controld/daemon_cpg.c:2681: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).
	return strlen(str) + 1;
data/dlm-4.0.9/dlm_controld/fence.c:18:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(args);
data/dlm-4.0.9/dlm_controld/fence_config.c:120: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(dev_line) > MAX_LINE)
data/dlm-4.0.9/dlm_controld/fence_config.c:139:33:  [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 (!strncmp(line, "unfence", strlen("unfence"))) {
data/dlm-4.0.9/dlm_controld/fence_config.c:147: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).
		if (strncmp(line, "connect", strlen("connect")))
data/dlm-4.0.9/dlm_controld/fence_config.c:183:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(dev->name, dev_name, FENCE_CONFIG_NAME_MAX-1);
data/dlm-4.0.9/dlm_controld/fence_config.c:184:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(dev->agent, agent, FENCE_CONFIG_NAME_MAX-1);
data/dlm-4.0.9/dlm_controld/fence_config.c:185:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(dev->args, dev_args, FENCE_CONFIG_ARGS_MAX-1);
data/dlm-4.0.9/dlm_controld/fence_config.c:186:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(con->name, con_name, FENCE_CONFIG_NAME_MAX-1);
data/dlm-4.0.9/dlm_controld/fence_config.c:187:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(con->args, con_args, FENCE_CONFIG_ARGS_MAX-1);
data/dlm-4.0.9/dlm_controld/fence_config.c:242:35:  [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 (!strncmp(line, "fence_all", strlen("fence_all"))) {
data/dlm-4.0.9/dlm_controld/fence_config.c:263:38:  [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).
			    !strncmp(line, "unfence_all", strlen("unfence_all")))
data/dlm-4.0.9/dlm_controld/fence_config.c:272:31:  [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 (strncmp(line, "device", strlen("device")))
data/dlm-4.0.9/dlm_controld/fence_config.c:313:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(a->name);
data/dlm-4.0.9/dlm_controld/fence_config.c:314: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 (len > strlen(b->name))
data/dlm-4.0.9/dlm_controld/fence_config.c:315: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(b->name);
data/dlm-4.0.9/dlm_controld/fence_config.c:402:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(node);
data/dlm-4.0.9/dlm_controld/fence_config.c:405: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).
		len += strlen(dev->args) + 1; /* +1 for \n */
data/dlm-4.0.9/dlm_controld/fence_config.c:407: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).
		len += strlen(con->args) + 1;
data/dlm-4.0.9/dlm_controld/fence_config.c:409: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).
		len += strlen(extra) + 1;
data/dlm-4.0.9/dlm_controld/fence_config.c:417: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).
		for (i = 0; i < strlen(dev->args); i++) {
data/dlm-4.0.9/dlm_controld/fence_config.c:430: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).
		for (i = 0; i < strlen(con->args); i++) {
data/dlm-4.0.9/dlm_controld/helper.c:155: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).
	cmd_len = strlen(cmd_str);
data/dlm-4.0.9/dlm_controld/helper.c:228:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(fd, req, sizeof(struct run_request));
data/dlm-4.0.9/dlm_controld/helper.c:364:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				rv = read(cmd_pipe[0], cmd_buf, sizeof(cmd_buf));
data/dlm-4.0.9/dlm_controld/lib.c:28:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		rv = read(fd, (char *)buf + off, count - off);
data/dlm-4.0.9/dlm_controld/lib.c:73:34:  [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).
	addrlen = sizeof(sa_family_t) + strlen(sun.sun_path+1) + 1;
data/dlm-4.0.9/dlm_controld/lib.c:95:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(h->name, name, DLM_LOCKSPACE_LEN);
data/dlm-4.0.9/dlm_controld/lib.c:765:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(name, h.name, DLM_LOCKSPACE_LEN);
data/dlm-4.0.9/dlm_controld/lib.c:833:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cmdbuf, run_command, DLMC_RUN_COMMAND_LEN-1);
data/dlm-4.0.9/dlm_controld/lib.c:884:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(h.name, run_uuid, DLMC_RUN_UUID_LEN);
data/dlm-4.0.9/dlm_controld/main.c:54:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		rv = read(fd, (char *)buf + off, count - off);
data/dlm-4.0.9/dlm_controld/main.c:342:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(client[ci].fd, &reply, sizeof(reply));
data/dlm-4.0.9/dlm_controld/main.c:442:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(run->command, data, datalen);
data/dlm-4.0.9/dlm_controld/main.c:451:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(req.command, data, datalen);
data/dlm-4.0.9/dlm_controld/main.c:548:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ls->name, name, DLM_LOCKSPACE_LEN);
data/dlm-4.0.9/dlm_controld/main.c:570:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if ((strlen(ls->name) == strlen(name)) &&
data/dlm-4.0.9/dlm_controld/main.c:570: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).
		if ((strlen(ls->name) == strlen(name)) &&
data/dlm-4.0.9/dlm_controld/main.c:571: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).
		    !strncmp(ls->name, name, strlen(name)))
data/dlm-4.0.9/dlm_controld/main.c:613:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(fs->name, name, DLM_LOCKSPACE_LEN);
data/dlm-4.0.9/dlm_controld/main.c:803:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(h->name, name, DLM_LOCKSPACE_LEN);
data/dlm-4.0.9/dlm_controld/main.c:822:13:  [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 (pos + strlen(tmp) >= LOG_DUMP_SIZE)
data/dlm-4.0.9/dlm_controld/main.c:832:13:  [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 (pos + strlen(tmp) >= LOG_DUMP_SIZE)
data/dlm-4.0.9/dlm_controld/main.c:888:13:  [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 (pos + strlen(tmp) >= LOG_DUMP_SIZE)
data/dlm-4.0.9/dlm_controld/main.c:1228:34:  [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).
	addrlen = sizeof(sa_family_t) + strlen(addr.sun_path+1) + 1;
data/dlm-4.0.9/dlm_controld/main.c:1563:14:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	old_umask = umask(0022);
data/dlm-4.0.9/dlm_controld/main.c:1566:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		umask(old_umask);
data/dlm-4.0.9/dlm_controld/main.c:1569:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(old_umask);
data/dlm-4.0.9/dlm_controld/main.c:1602: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).
	rv = write(fd, buf, strlen(buf));
data/dlm-4.0.9/dlm_controld/main.c:1657:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (!strlen(o->desc))
data/dlm-4.0.9/dlm_controld/main.c:1839: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 (i = 0; i < strlen(s); i++) {
data/dlm-4.0.9/dlm_controld/main.c:1932:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if ((p[0] == '-') && isalpha(p[1]) && (strlen(p) > 2)) {
data/dlm-4.0.9/dlm_controld/main.c:1933: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).
				for (b = 2; b < strlen(p) && blc < blc_max; b++) {
data/dlm-4.0.9/dlm_controld/main.c:1948:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		} else if (strlen(p) > 2 && isalpha(p[1]) && isdigit(p[2])) {
data/dlm-4.0.9/dlm_controld/netlink.c:93:5:  [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(DLM_GENL_NAME)+1);
data/dlm-4.0.9/dlm_tool/main.c:310:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    (strlen(argv[optind]) == 4)) {
data/dlm-4.0.9/dlm_tool/main.c:315:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			   (strlen(argv[optind]) == 5)) {
data/dlm-4.0.9/dlm_tool/main.c:320:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			   (strlen(argv[optind]) == 9)) {
data/dlm-4.0.9/dlm_tool/main.c:331:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			   (strlen(argv[optind]) == 2)) {
data/dlm-4.0.9/dlm_tool/main.c:337:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			   (strlen(argv[optind]) == 6)) {
data/dlm-4.0.9/dlm_tool/main.c:343:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			   (strlen(argv[optind]) == 14)) {
data/dlm-4.0.9/dlm_tool/main.c:348:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			   (strlen(argv[optind]) == 9)) {
data/dlm-4.0.9/dlm_tool/main.c:353:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			   (strlen(argv[optind]) == 4)) {
data/dlm-4.0.9/dlm_tool/main.c:359:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			   (strlen(argv[optind]) == 11)) {
data/dlm-4.0.9/dlm_tool/main.c:365:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			   (strlen(argv[optind]) == 6)) {
data/dlm-4.0.9/dlm_tool/main.c:370:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			   (strlen(argv[optind]) == 9)) {
data/dlm-4.0.9/dlm_tool/main.c:413:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			   (strlen(argv[optind]) == 8)) {
data/dlm-4.0.9/dlm_tool/main.c:418:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			   (strlen(argv[optind]) == 9)) {
data/dlm-4.0.9/dlm_tool/main.c:438:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(run_uuid, argv[opt_ind], DLMC_RUN_UUID_LEN);
data/dlm-4.0.9/dlm_tool/main.c:457: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(run_command) + strlen(argv[i]) + 2 > DLMC_RUN_COMMAND_LEN) {
data/dlm-4.0.9/dlm_tool/main.c:457:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(run_command) + strlen(argv[i]) + 2 > DLMC_RUN_COMMAND_LEN) {
data/dlm-4.0.9/dlm_tool/main.c:463:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(run_command, " ");
data/dlm-4.0.9/dlm_tool/main.c:621:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat(addr, " ");
data/dlm-4.0.9/dlm_tool/main.c:850:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat(addr, " ");
data/dlm-4.0.9/dlm_tool/main.c:1442:31:  [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).
	do_write(STDOUT_FILENO, buf, strlen(buf));
data/dlm-4.0.9/dlm_tool/main.c:1460:31:  [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).
	do_write(STDOUT_FILENO, buf, strlen(buf));
data/dlm-4.0.9/dlm_tool/main.c:1474:31:  [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).
	do_write(STDOUT_FILENO, buf, strlen(buf));
data/dlm-4.0.9/dlm_tool/main.c:1493:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		rv = dlmc_run_start(run_command, strlen(run_command), 0,
data/dlm-4.0.9/dlm_tool/main.c:1505:33:  [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).
		rv = dlmc_run_check(run_uuid, strlen(run_uuid), wait_sec, flags,
data/dlm-4.0.9/libdlm/libdlm.c:179: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).
		      strlen(resource),
data/dlm-4.0.9/libdlm/libdlm.c:329:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(control_fd, &v, sizeof(struct dlm_device_version));
data/dlm-4.0.9/libdlm/libdlm.c:424: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).
	basename_len = strlen(bname);
data/dlm-4.0.9/libdlm/libdlm.c:444:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strlen(de->d_name) < MAX_SYSFS_NAME)
data/dlm-4.0.9/libdlm/libdlm.c:456:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(udev_path, tmp_path, PATH_MAX);
data/dlm-4.0.9/libdlm/libdlm.c:480:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	status = read(fd, result, sizeof(resultbuf));
data/dlm-4.0.9/libdlm/libdlm.c:493:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		newstat = read(fd, (struct dlm_lock_result_v5 *)fullresult,
data/dlm-4.0.9/libdlm/libdlm.c:539:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	status = read(fd, result, sizeof(resultbuf));
data/dlm-4.0.9/libdlm/libdlm.c:1243: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).
	int namelen = strlen(name);
data/dlm-4.0.9/libdlm/libdlm.c:1267: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).
	int namelen = strlen(name);

ANALYSIS SUMMARY:

Hits = 437
Lines analyzed = 20076 in approximately 0.52 seconds (38322 lines/second)
Physical Source Lines of Code (SLOC) = 14581
Hits@level = [0] 260 [1] 115 [2] 277 [3]   3 [4]  42 [5]   0
Hits@level+ = [0+] 697 [1+] 437 [2+] 322 [3+]  45 [4+]  42 [5+]   0
Hits/KSLOC@level+ = [0+] 47.8019 [1+] 29.9705 [2+] 22.0835 [3+] 3.08621 [4+] 2.88046 [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.