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/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c
Examining data/sanlock-3.8.2/python/sanlock.c
Examining data/sanlock-3.8.2/reset/sanlk_reset.c
Examining data/sanlock-3.8.2/reset/sanlk_reset.h
Examining data/sanlock-3.8.2/reset/sanlk_resetd.c
Examining data/sanlock-3.8.2/src/client.c
Examining data/sanlock-3.8.2/src/client_cmd.c
Examining data/sanlock-3.8.2/src/client_cmd.h
Examining data/sanlock-3.8.2/src/cmd.c
Examining data/sanlock-3.8.2/src/cmd.h
Examining data/sanlock-3.8.2/src/crc32c.c
Examining data/sanlock-3.8.2/src/delta_lease.c
Examining data/sanlock-3.8.2/src/delta_lease.h
Examining data/sanlock-3.8.2/src/direct.c
Examining data/sanlock-3.8.2/src/direct.h
Examining data/sanlock-3.8.2/src/direct_lib.c
Examining data/sanlock-3.8.2/src/diskio.c
Examining data/sanlock-3.8.2/src/diskio.h
Examining data/sanlock-3.8.2/src/env.c
Examining data/sanlock-3.8.2/src/env.h
Examining data/sanlock-3.8.2/src/helper.c
Examining data/sanlock-3.8.2/src/helper.h
Examining data/sanlock-3.8.2/src/leader.h
Examining data/sanlock-3.8.2/src/list.h
Examining data/sanlock-3.8.2/src/lockfile.c
Examining data/sanlock-3.8.2/src/lockfile.h
Examining data/sanlock-3.8.2/src/lockspace.c
Examining data/sanlock-3.8.2/src/lockspace.h
Examining data/sanlock-3.8.2/src/log.c
Examining data/sanlock-3.8.2/src/log.h
Examining data/sanlock-3.8.2/src/mode_block.h
Examining data/sanlock-3.8.2/src/monotime.c
Examining data/sanlock-3.8.2/src/monotime.h
Examining data/sanlock-3.8.2/src/ondisk.c
Examining data/sanlock-3.8.2/src/ondisk.h
Examining data/sanlock-3.8.2/src/paxos_dblock.h
Examining data/sanlock-3.8.2/src/paxos_lease.h
Examining data/sanlock-3.8.2/src/resource.c
Examining data/sanlock-3.8.2/src/resource.h
Examining data/sanlock-3.8.2/src/rindex.c
Examining data/sanlock-3.8.2/src/rindex.h
Examining data/sanlock-3.8.2/src/rindex_disk.h
Examining data/sanlock-3.8.2/src/sanlock.h
Examining data/sanlock-3.8.2/src/sanlock_admin.h
Examining data/sanlock-3.8.2/src/sanlock_direct.h
Examining data/sanlock-3.8.2/src/sanlock_internal.h
Examining data/sanlock-3.8.2/src/sanlock_resource.h
Examining data/sanlock-3.8.2/src/sanlock_rv.h
Examining data/sanlock-3.8.2/src/sanlock_sock.c
Examining data/sanlock-3.8.2/src/sanlock_sock.h
Examining data/sanlock-3.8.2/src/sizeflags.c
Examining data/sanlock-3.8.2/src/sizeflags.h
Examining data/sanlock-3.8.2/src/task.c
Examining data/sanlock-3.8.2/src/task.h
Examining data/sanlock-3.8.2/src/timeouts.c
Examining data/sanlock-3.8.2/src/timeouts.h
Examining data/sanlock-3.8.2/src/watchdog.c
Examining data/sanlock-3.8.2/src/watchdog.h
Examining data/sanlock-3.8.2/src/main.c
Examining data/sanlock-3.8.2/src/paxos_lease.c
Examining data/sanlock-3.8.2/tests/devcount.c
Examining data/sanlock-3.8.2/tests/killpath.c
Examining data/sanlock-3.8.2/tests/sanlk_client.c
Examining data/sanlock-3.8.2/tests/sanlk_events.c
Examining data/sanlock-3.8.2/tests/sanlk_load.c
Examining data/sanlock-3.8.2/tests/sanlk_lockr.c
Examining data/sanlock-3.8.2/tests/sanlk_lvb.c
Examining data/sanlock-3.8.2/tests/sanlk_path.c
Examining data/sanlock-3.8.2/tests/sanlk_rename.c
Examining data/sanlock-3.8.2/tests/sanlk_string.c
Examining data/sanlock-3.8.2/tests/sanlk_testr.c
Examining data/sanlock-3.8.2/wdmd/client.c
Examining data/sanlock-3.8.2/wdmd/wdmd.h
Examining data/sanlock-3.8.2/wdmd/wdmd_client.c
Examining data/sanlock-3.8.2/wdmd/wdmd_sock.c
Examining data/sanlock-3.8.2/wdmd/wdmd_sock.h
Examining data/sanlock-3.8.2/wdmd/main.c

FINAL RESULTS:

data/sanlock-3.8.2/reset/sanlk_resetd.c:462:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	rv = chmod(update_addr.sun_path, SANLK_RESETD_SOCKET_MODE);
data/sanlock-3.8.2/src/lockfile.c:50:7:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	rv = chown(dir, uid, gid);
data/sanlock-3.8.2/src/main.c:1370:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	rv = chmod(addr.sun_path, DEFAULT_SOCKET_MODE);
data/sanlock-3.8.2/src/main.c:1374:7:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	rv = chown(addr.sun_path, com.uid, com.gid);
data/sanlock-3.8.2/src/paxos_lease.c:580:5:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
				strncat(bk_debug, bk_str, BK_STR_SIZE-1);
data/sanlock-3.8.2/src/paxos_lease.c:793:5:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
				strncat(bk_debug, bk_str, BK_STR_SIZE-1);
data/sanlock-3.8.2/src/paxos_lease.c:1410:4:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
			strncat(bk_debug, bk_str, BK_STR_SIZE-1);
data/sanlock-3.8.2/wdmd/main.c:292:2:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
	strncat(debug_buf, line, LINE_SIZE);
data/sanlock-3.8.2/wdmd/main.c:315:3:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
		strncat(debug_buf, line, LINE_SIZE);
data/sanlock-3.8.2/wdmd/main.c:334:3:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
		strncat(debug_buf, line, LINE_SIZE);
data/sanlock-3.8.2/wdmd/main.c:461:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	rv = chmod(addr.sun_path, DEFAULT_SOCKET_MODE);
data/sanlock-3.8.2/wdmd/main.c:468:7:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	rv = chown(addr.sun_path, -1, socket_gid);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:87:2:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	syslog(LOG_ERR, fmt, ##args); \
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:157:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(lockfile_path, "%s/%s.pid", DAEMON_RUN_DIR, prog_name);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:197:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(lockfile_path, "%s/%s.pid", DAEMON_RUN_DIR, prog_name);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:321: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(fifo_line, "%s %s %s %s", key1, val1, key2, val2);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:484:8:  [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.
		rv = fscanf(file, "%s", name);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:545:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(lease_path, optarg);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:660:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(disk.path, "%s", lease_path);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:669:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(ls.host_id_disk.path, "%s", lease_path);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:700:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(r->disks[0].path, "%s", lease_path);
data/sanlock-3.8.2/reset/sanlk_reset.c:172:2:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	syslog(LOG_WARNING, fmt, ##args); \
data/sanlock-3.8.2/reset/sanlk_reset.c:178:2:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	syslog(LOG_ERR, fmt, ##args); \
data/sanlock-3.8.2/reset/sanlk_reset.h:33: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(update_addr.sun_path, SANLK_RESETD_SOCKET);
data/sanlock-3.8.2/reset/sanlk_resetd.c:81:2:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	syslog(LOG_ERR, fmt, ##args); \
data/sanlock-3.8.2/reset/sanlk_resetd.c:87:2:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	syslog(LOG_WARNING, fmt, ##args); \
data/sanlock-3.8.2/reset/sanlk_resetd.c:93:2:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	syslog(LOG_NOTICE, fmt, ##args); \
data/sanlock-3.8.2/reset/sanlk_resetd.c:494: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(buf, "%s %s", cmd, name);
data/sanlock-3.8.2/src/client.c:2117: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(state, str);
data/sanlock-3.8.2/src/cmd.c:826: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(state, str);
data/sanlock-3.8.2/src/direct_lib.c:96:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(task->name, "%s", "lib");
data/sanlock-3.8.2/src/helper.c:107: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/sanlock-3.8.2/src/helper.c:160:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(name, "%s", "sanlock-helper");
data/sanlock-3.8.2/src/log.c:188: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/sanlock-3.8.2/src/log.h:31:24:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	__attribute__((format(printf, 5, 6)));
data/sanlock-3.8.2/src/log.h:64:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(fmt "\n", ##args); \
data/sanlock-3.8.2/src/main.c:1723:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(main_task.name, "%s", "main");
data/sanlock-3.8.2/src/main.c:2694: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/sanlock-3.8.2/src/main.c:2707: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/sanlock-3.8.2/src/main.c:2711: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/sanlock-3.8.2/src/main.c:3181:3:  [4] (shell) execv:
  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.
		execv(command, cmd_argv);
data/sanlock-3.8.2/src/main.c:3240:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(res_ls->lockspace_name, com.lockspace.name);
data/sanlock-3.8.2/src/main.c:3448:8:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		rv = sscanf(line, "%s %s", field, val);
data/sanlock-3.8.2/src/main.c:3692:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(main_task.name, "%s", "main_direct");
data/sanlock-3.8.2/src/resource.c:2461:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(task.name, "%s", "resource");
data/sanlock-3.8.2/tests/devcount.c:239: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(count_path, argv[2]);
data/sanlock-3.8.2/tests/devcount.c:481: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(lockspace.host_id_disk.path, lock_path);
data/sanlock-3.8.2/tests/devcount.c:538: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(lock_path, argv[2]);
data/sanlock-3.8.2/tests/devcount.c:539: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(count_path, argv[4]);
data/sanlock-3.8.2/tests/devcount.c:547: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(res->lockspace_name, lockspace.name);
data/sanlock-3.8.2/tests/devcount.c:611:4:  [4] (shell) execv:
  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.
			execv(av[0], av);
data/sanlock-3.8.2/tests/devcount.c:729: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(lock_path, argv[2]);
data/sanlock-3.8.2/tests/devcount.c:730: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(count_path, argv[4]);
data/sanlock-3.8.2/tests/devcount.c:738: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(res->lockspace_name, lockspace.name);
data/sanlock-3.8.2/tests/devcount.c:784:4:  [4] (shell) execv:
  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.
			execv(av[0], av);
data/sanlock-3.8.2/tests/devcount.c:813: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(lock_path, argv[2]);
data/sanlock-3.8.2/tests/devcount.c:814: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(count_path, argv[4]);
data/sanlock-3.8.2/tests/devcount.c:822: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(res->lockspace_name, lockspace.name);
data/sanlock-3.8.2/tests/devcount.c:869:2:  [4] (shell) execv:
  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.
	execv(av[0], av);
data/sanlock-3.8.2/tests/devcount.c:901:2:  [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(state, state_in);
data/sanlock-3.8.2/tests/devcount.c:902:2:  [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(state, target_str);
data/sanlock-3.8.2/tests/devcount.c:1032:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(wbuf, "%s", "empty");
data/sanlock-3.8.2/tests/devcount.c:1070: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(lock_path, argv[2]);
data/sanlock-3.8.2/tests/devcount.c:1071: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(count_path, argv[4]);
data/sanlock-3.8.2/tests/devcount.c:1080: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(res->lockspace_name, lockspace.name);
data/sanlock-3.8.2/tests/devcount.c:1132:4:  [4] (shell) execv:
  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.
			execv(av[0], av);
data/sanlock-3.8.2/tests/devcount.c:1220:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(cmd, "./devcount-dmsetup save %s", lock_path);
data/sanlock-3.8.2/tests/devcount.c:1221:2:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	system(cmd);
data/sanlock-3.8.2/tests/devcount.c:1227:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(cmd, "./devcount-dmsetup error %s", lock_path);
data/sanlock-3.8.2/tests/devcount.c:1228:2:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	system(cmd);
data/sanlock-3.8.2/tests/devcount.c:1234:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(cmd, "./devcount-dmsetup linear %s", lock_path);
data/sanlock-3.8.2/tests/devcount.c:1235:2:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	system(cmd);
data/sanlock-3.8.2/tests/devcount.c:1252: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(lock_path, argv[2]);
data/sanlock-3.8.2/tests/devcount.c:1253: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(count_path, argv[4]);
data/sanlock-3.8.2/tests/devcount.c:1263: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(res->lockspace_name, lockspace.name);
data/sanlock-3.8.2/tests/devcount.c:1325:4:  [4] (shell) execv:
  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.
			execv(av[0], av);
data/sanlock-3.8.2/tests/devcount.c:1414: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(count_path, argv[3]);
data/sanlock-3.8.2/tests/devcount.c:1427:2:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	system(command);
data/sanlock-3.8.2/tests/devcount.c:1442:2:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	system(command);
data/sanlock-3.8.2/tests/devcount.c:1445: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(disk.path, argv[2]);
data/sanlock-3.8.2/tests/devcount.c:1456: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(ls.host_id_disk.path, argv[2]);
data/sanlock-3.8.2/tests/devcount.c:1475:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(res->name, "resource%s", argv[3]);
data/sanlock-3.8.2/tests/devcount.c:1477: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(res->disks[0].path, argv[2]);
data/sanlock-3.8.2/tests/devcount.c:1494:2:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	system(command);
data/sanlock-3.8.2/tests/killpath.c:36:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(arg, "%s ", argv[i]);
data/sanlock-3.8.2/tests/killpath.c:37: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, arg);
data/sanlock-3.8.2/tests/sanlk_client.c:42: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(res->lockspace_name, argv[1]);
data/sanlock-3.8.2/tests/sanlk_client.c:43: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(res->name, argv[2]);
data/sanlock-3.8.2/tests/sanlk_client.c:45: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(res->disks[0].path, argv[3]);
data/sanlock-3.8.2/tests/sanlk_client.c:48: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(path, argv[5]);
data/sanlock-3.8.2/tests/sanlk_client.c:52:4:  [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, argv[i]);
data/sanlock-3.8.2/tests/sanlk_load.c:295:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(ls.host_id_disk.path, "%s%d", lock_disk_base, i);
data/sanlock-3.8.2/tests/sanlk_load.c:321:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(ls.host_id_disk.path, "%s%d", lock_disk_base, i);
data/sanlock-3.8.2/tests/sanlk_load.c:399:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(r1->disks[0].path, "%s%d", lock_disk_base, _s1);
data/sanlock-3.8.2/tests/sanlk_load.c:448:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(r1->disks[0].path, "%s%d", lock_disk_base, _s1);
data/sanlock-3.8.2/tests/sanlk_load.c:456:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(r2->disks[0].path, "%s%d", lock_disk_base, _s2);
data/sanlock-3.8.2/tests/sanlk_load.c:798: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(lock_disk_base, argv[2]);
data/sanlock-3.8.2/tests/sanlk_load.c:953: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(lock_disk_base, argv[2]);
data/sanlock-3.8.2/tests/sanlk_load.c:1032: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(lock_disk_base, argv[2]);
data/sanlock-3.8.2/tests/sanlk_load.c:1042:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(ls.host_id_disk.path, "%s%d", lock_disk_base, i);
data/sanlock-3.8.2/tests/sanlk_load.c:1057:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(res->lockspace_name, ls.name);
data/sanlock-3.8.2/tests/sanlk_load.c:1060:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(res->disks[0].path, ls.host_id_disk.path);
data/sanlock-3.8.2/tests/sanlk_lockr.c:41: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(res->lockspace_name, argv[1]);
data/sanlock-3.8.2/tests/sanlk_lockr.c:42: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(res->name, argv[2]);
data/sanlock-3.8.2/tests/sanlk_lockr.c:44: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(res->disks[0].path, argv[3]);
data/sanlock-3.8.2/tests/sanlk_lvb.c:51: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(res->lockspace_name, argv[2]);
data/sanlock-3.8.2/tests/sanlk_lvb.c:52: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(res->name, argv[3]);
data/sanlock-3.8.2/tests/sanlk_lvb.c:54: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(res->disks[0].path, argv[4]);
data/sanlock-3.8.2/tests/sanlk_rename.c:50: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(res->lockspace_name, argv[1]);
data/sanlock-3.8.2/tests/sanlk_rename.c:51: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(res->name, argv[2]);
data/sanlock-3.8.2/tests/sanlk_rename.c:52: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(res2->name, argv[3]);
data/sanlock-3.8.2/tests/sanlk_rename.c:54: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(res->disks[0].path, argv[4]);
data/sanlock-3.8.2/tests/sanlk_string.c:72: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(state, argv[i]);
data/sanlock-3.8.2/wdmd/main.c:127:2:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	syslog(LOG_ERR, fmt, ##args); \
data/sanlock-3.8.2/wdmd/main.c:725: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(path, path, NULL);
data/sanlock-3.8.2/wdmd/main.c:1398:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(lockfile_path, "%s/wdmd.pid", WDMD_RUN_DIR);
data/sanlock-3.8.2/wdmd/wdmd_client.c:35:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(name, "%s", "wdmd_client");
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:538: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, "Dp:i:hVws1");
data/sanlock-3.8.2/reset/sanlk_reset.c:720:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, "hVi:g:w:b:R:D",
data/sanlock-3.8.2/reset/sanlk_resetd.c:587:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, "hVfDw:b:d:R:",
data/sanlock-3.8.2/src/direct_lib.c:89:43:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	return a + (int) (((float)(b - a + 1)) * random() / (RAND_MAX+1.0));
data/sanlock-3.8.2/src/env.c:18:8:  [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.
	val = getenv(key);
data/sanlock-3.8.2/src/env.c:29:8:  [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.
	val = getenv(key);
data/sanlock-3.8.2/src/main.c:1447:7:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	rv = random();
data/sanlock-3.8.2/tests/devcount.c:161:43:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	return a + (int) (((float)(b - a + 1)) * random() / (RAND_MAX+1.0)); 
data/sanlock-3.8.2/tests/sanlk_load.c:83:43:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	return a + (int) (((float)(b - a + 1)) * random() / (RAND_MAX+1.0));
data/sanlock-3.8.2/tests/sanlk_load.c:95:20:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	n = (unsigned int)random();;
data/sanlock-3.8.2/tests/sanlk_load.c:550:2:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srandom(pid);
data/sanlock-3.8.2/tests/sanlk_load.c:657:2:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srandom(pid);
data/sanlock-3.8.2/wdmd/main.c:1567:10:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	    c = getopt_long(argc, argv, "hpdVDH:G:S:s:k:w:",
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:51: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 lease_path[PATH_MAX];
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:55: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 rdbuf[sizeof(struct sanlk_resource) + sizeof(struct sanlk_disk)];
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.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 lockfile_path[PATH_MAX];
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:57: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 fifo_path[PATH_MAX];
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:58: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 fifo_line[PATH_MAX];
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:59: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 key1[PATH_MAX];
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:60: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 key2[PATH_MAX];
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:61: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 val1[PATH_MAX];
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:62: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 val2[PATH_MAX];
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:154: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/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:159: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(lockfile_path, O_RDONLY);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:176:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	*pid = atoi(buf);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.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 buf[16];
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:199: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(lockfile_path, O_CREAT|O_WRONLY|O_CLOEXEC, 0644);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:306: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(fifo_path, O_RDONLY|O_CLOEXEC);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:335:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	our_host_id = atoi(val2);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:364: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(fifo_path, O_WRONLY|O_CLOEXEC);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:419: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/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:420: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 rest[512];
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:421: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[512];
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:459: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/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:478: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/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:548: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).
			our_host_id = atoi(optarg);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:670: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(ls.name, "fence");
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:698: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(r->lockspace_name, "fence");
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:699: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(r->name, "h%d", our_host_id);
data/sanlock-3.8.2/python/sanlock.c:1408:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char kpargs[SANLK_HELPER_ARGS_LEN] = "";
data/sanlock-3.8.2/reset/sanlk_reset.c:142: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 *ls_names[MAX_LS];
data/sanlock-3.8.2/reset/sanlk_reset.c:607: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[UPDATE_SIZE];
data/sanlock-3.8.2/reset/sanlk_reset.c:735:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			target_host_id = atoi(optarg);
data/sanlock-3.8.2/reset/sanlk_reset.c:741:19:  [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).
			use_watchdog = atoi(optarg);
data/sanlock-3.8.2/reset/sanlk_reset.c:744:23:  [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).
			use_sysrq_reboot = atoi(optarg);
data/sanlock-3.8.2/reset/sanlk_reset.c:747:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			resource_mode = atoi(optarg);
data/sanlock-3.8.2/reset/sanlk_reset.c:750:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			if (!atoi(optarg))
data/sanlock-3.8.2/reset/sanlk_reset.c:820:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			ls_hostids[i] = atoi(colon+1);
data/sanlock-3.8.2/reset/sanlk_resetd.c:63: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 *ls_names[MAX_LS];
data/sanlock-3.8.2/reset/sanlk_resetd.c:124: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("/proc/sysrq-trigger", O_WRONLY);
data/sanlock-3.8.2/reset/sanlk_resetd.c:172: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[WDMD_NAME_SIZE];
data/sanlock-3.8.2/reset/sanlk_resetd.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 buf[UPDATE_SIZE];
data/sanlock-3.8.2/reset/sanlk_resetd.c:477: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[UPDATE_SIZE];
data/sanlock-3.8.2/reset/sanlk_resetd.c:478: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[UPDATE_SIZE];
data/sanlock-3.8.2/reset/sanlk_resetd.c:609:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			resource_mode = atoi(optarg);
data/sanlock-3.8.2/reset/sanlk_resetd.c:612:19:  [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).
			use_watchdog = atoi(optarg);
data/sanlock-3.8.2/reset/sanlk_resetd.c:615:23:  [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).
			use_sysrq_reboot = atoi(optarg);
data/sanlock-3.8.2/reset/sanlk_resetd.c:618: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).
			sysrq_delay = atoi(optarg);
data/sanlock-3.8.2/src/client.c:979: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(he, &cb.he, sizeof(struct sanlk_host_event));
data/sanlock-3.8.2/src/client.c:1071: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_max[SANLK_HELPER_PATH_LEN];
data/sanlock-3.8.2/src/client.c:1072: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[SANLK_HELPER_ARGS_LEN];
data/sanlock-3.8.2/src/client.c:1128: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(&opt, opt_in, sizeof(struct sanlk_options));
data/sanlock-3.8.2/src/client.c:1526: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(lvb, reply_data, len);
data/sanlock-3.8.2/src/client.c:1641: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(re, &re_recv, sizeof(struct sanlk_rentry));
data/sanlock-3.8.2/src/client.c:1697: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(re, &re_recv, sizeof(struct sanlk_rentry));
data/sanlock-3.8.2/src/client.c:1754: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(re, &re_recv, sizeof(struct sanlk_rentry));
data/sanlock-3.8.2/src/client.c:1908: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[SANLK_PATH_LEN + 1];
data/sanlock-3.8.2/src/client.c:1976: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 sub[SANLK_PATH_LEN + 1];
data/sanlock-3.8.2/src/client.c:2138: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[SANLK_MAX_RES_STR + 1];
data/sanlock-3.8.2/src/client_cmd.c:98: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[SANLK_PATH_LEN + 1];
data/sanlock-3.8.2/src/client_cmd.c:124: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[SANLK_PATH_LEN + 1];
data/sanlock-3.8.2/src/client_cmd.c:182: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 *sort_bufs[MAX_SORT_ENTRIES];
data/sanlock-3.8.2/src/client_cmd.c:359: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[SANLK_STATE_MAXSTR];
data/sanlock-3.8.2/src/client_cmd.c:360: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[SANLK_STATE_MAXSTR];
data/sanlock-3.8.2/src/client_cmd.c:464: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[SANLK_STATE_MAXSTR];
data/sanlock-3.8.2/src/client_cmd.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 maxstr[SANLK_STATE_MAXSTR];
data/sanlock-3.8.2/src/client_cmd.c:522: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[SANLK_STATE_MAXSTR];
data/sanlock-3.8.2/src/client_cmd.c:593: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[SANLK_STATE_MAXSTR];
data/sanlock-3.8.2/src/cmd.c:168:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char killpath[SANLK_HELPER_PATH_LEN];
data/sanlock-3.8.2/src/cmd.c:169: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 killargs[SANLK_HELPER_ARGS_LEN];
data/sanlock-3.8.2/src/cmd.c:225: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(grow_tokens, cl->tokens, cl->tokens_slots * sizeof(struct token *));
data/sanlock-3.8.2/src/cmd.c:233: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(killpath, cl->killpath, SANLK_HELPER_PATH_LEN);
data/sanlock-3.8.2/src/cmd.c:234: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(killargs, cl->killargs, SANLK_HELPER_ARGS_LEN);
data/sanlock-3.8.2/src/cmd.c:280: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(token->r.lockspace_name, res.lockspace_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/cmd.c:281: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(token->r.name, res.name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/cmd.c:847: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(&h, &ca->header, sizeof(struct sm_header));
data/sanlock-3.8.2/src/cmd.c:991: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(token->r.lockspace_name, res.lockspace_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/cmd.c:992: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(token->r.name, res.name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/cmd.c:1184: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(&h, &ca->header, sizeof(struct sm_header));
data/sanlock-3.8.2/src/cmd.c:1475: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(&sd, &disk, sizeof(struct sanlk_disk));
data/sanlock-3.8.2/src/cmd.c:1532: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(&sd, &lockspace.host_id_disk, sizeof(struct sanlk_disk));
data/sanlock-3.8.2/src/cmd.c:1566: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(&h, &ca->header, sizeof(struct sm_header));
data/sanlock-3.8.2/src/cmd.c:1612: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(token->r.lockspace_name, res.lockspace_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/cmd.c:1613: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(token->r.name, res.name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/cmd.c:1666: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(&h, &ca->header, sizeof(struct sm_header));
data/sanlock-3.8.2/src/cmd.c:1713: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(token->r.lockspace_name, res.lockspace_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/cmd.c:1714: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(token->r.name, res.name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/cmd.c:1769: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(&h, &ca->header, sizeof(struct sm_header));
data/sanlock-3.8.2/src/cmd.c:1817: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(&sd, &lockspace.host_id_disk, sizeof(struct sanlk_disk));
data/sanlock-3.8.2/src/cmd.c:1876: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(token->r.lockspace_name, res.lockspace_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/cmd.c:1877: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(token->r.name, res.name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/cmd.c:2127: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(&h, &ca->header, sizeof(struct sm_header));
data/sanlock-3.8.2/src/cmd.c:2159:3:  [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(client[ca->ci_in].owner_name, "add_lockspace");
data/sanlock-3.8.2/src/cmd.c:2163:3:  [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(client[ca->ci_in].owner_name, "inq_lockspace");
data/sanlock-3.8.2/src/cmd.c:2167:3:  [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(client[ca->ci_in].owner_name, "rem_lockspace");
data/sanlock-3.8.2/src/cmd.c:2468: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[SANLK_STATE_MAXSTR];
data/sanlock-3.8.2/src/cmd.c:2488: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[SANLK_STATE_MAXSTR];
data/sanlock-3.8.2/src/cmd.c:2510: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[SANLK_STATE_MAXSTR];
data/sanlock-3.8.2/src/cmd.c:2530: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.host_id_disk, &sp->host_id_disk, sizeof(struct sanlk_disk));
data/sanlock-3.8.2/src/cmd.c:2542: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[SANLK_STATE_MAXSTR];
data/sanlock-3.8.2/src/cmd.c:2571: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[SANLK_STATE_MAXSTR];
data/sanlock-3.8.2/src/cmd.c:2592: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[SANLK_STATE_MAXSTR];
data/sanlock-3.8.2/src/cmd.c:2619: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(&h, h_recv, sizeof(struct sm_header));
data/sanlock-3.8.2/src/cmd.c:2675: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(&h, h_recv, sizeof(struct sm_header));
data/sanlock-3.8.2/src/cmd.c:2697: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(status, &sp->host_status, status_len);
data/sanlock-3.8.2/src/cmd.c:2736: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(&h, h_recv, sizeof(struct sm_header));
data/sanlock-3.8.2/src/cmd.c:2772: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(history, sp->renewal_history, len);
data/sanlock-3.8.2/src/cmd.c:2815: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_data_buf[LOG_DUMP_SIZE];
data/sanlock-3.8.2/src/cmd.c:2856: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(&h, h_recv, sizeof(struct sm_header));
data/sanlock-3.8.2/src/cmd.c:2910: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(&h, h_recv, sizeof(struct sm_header));
data/sanlock-3.8.2/src/cmd.c:2941: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(&h, h_recv, sizeof(struct sm_header));
data/sanlock-3.8.2/src/cmd.c:2965: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(&h, h_recv, sizeof(struct sm_header));
data/sanlock-3.8.2/src/cmd.c:3037:3:  [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(client[ci].owner_name, "shutdown");
data/sanlock-3.8.2/src/cmd.c:3053:3:  [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(client[ci].owner_name, "status");
data/sanlock-3.8.2/src/cmd.c:3057:3:  [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(client[ci].owner_name, "host_status");
data/sanlock-3.8.2/src/cmd.c:3061:3:  [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(client[ci].owner_name, "renewal");
data/sanlock-3.8.2/src/cmd.c:3065:3:  [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(client[ci].owner_name, "log_dump");
data/sanlock-3.8.2/src/cmd.c:3069:3:  [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(client[ci].owner_name, "get_lockspaces");
data/sanlock-3.8.2/src/cmd.c:3073:3:  [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(client[ci].owner_name, "get_hosts");
data/sanlock-3.8.2/src/cmd.c:3077:3:  [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(client[ci].owner_name, "reg_event");
data/sanlock-3.8.2/src/cmd.c:3081:3:  [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(client[ci].owner_name, "end_event");
data/sanlock-3.8.2/src/cmd.c:3085:3:  [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(client[ci].owner_name, "set_config");
data/sanlock-3.8.2/src/delta_lease.c:192:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(ls->name, leader.space_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/delta_lease.c:285: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(leader_ret, &leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/delta_lease.c:406: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(&leader1, &leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/delta_lease.c:476: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(&leader1, &leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/delta_lease.c:512: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(leader_ret, &leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/delta_lease.c:672: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(&leader_end, task->iobuf+id_offset, sizeof(struct leader_record));
data/sanlock-3.8.2/src/delta_lease.c:748: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(wbuf, &leader_end, sizeof(struct leader_record));
data/sanlock-3.8.2/src/delta_lease.c:749: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(wbuf+LEADER_RECORD_MAX, bitmap, HOSTID_BITMAP_SIZE);
data/sanlock-3.8.2/src/delta_lease.c:777: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(leader_ret, &leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/delta_lease.c:802: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(&leader, leader_last, sizeof(struct leader_record));
data/sanlock-3.8.2/src/delta_lease.c:827: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(leader_ret, &leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/delta_lease.c:893: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(&leader_first, &leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/delta_lease.c:905: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(iobuf + (i * sector_size), &leader_end, sizeof(struct leader_record));
data/sanlock-3.8.2/src/delta_lease.c:937: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(iobuf, &leader_end, sizeof(struct leader_record));
data/sanlock-3.8.2/src/direct.c:153: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(token->r.lockspace_name, res->lockspace_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/direct.c:154: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(token->r.name, res->name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/direct.c:159: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(token->disks, &res->disks, disks_len);
data/sanlock-3.8.2/src/direct.c:257: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(leader_ret, &leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/direct.c:301: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 bitmap[HOSTID_BITMAP_SIZE];
data/sanlock-3.8.2/src/direct.c:331: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(&sd, &ls->host_id_disk, sizeof(struct sanlk_disk));
data/sanlock-3.8.2/src/direct.c:445: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(leader_ret, &leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/direct.c:571: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 sname[NAME_ID_SIZE+1];
data/sanlock-3.8.2/src/direct.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 rname[NAME_ID_SIZE+1];
data/sanlock-3.8.2/src/direct.c:951: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(re, &re_ret, sizeof(re_ret));
data/sanlock-3.8.2/src/direct.c:965: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(re, &re_ret, sizeof(re_ret));
data/sanlock-3.8.2/src/direct_lib.c:158: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(disk.path, disk_in->path, SANLK_PATH_LEN);
data/sanlock-3.8.2/src/diskio.c:37: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/sanlock-3.8.2/src/diskio.c:38: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/sanlock-3.8.2/src/diskio.c:54: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_RDONLY, 0);
data/sanlock-3.8.2/src/diskio.c:68:10:  [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 = atoi(buf);
data/sanlock-3.8.2/src/diskio.c:78: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/sanlock-3.8.2/src/diskio.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 buf[32];
data/sanlock-3.8.2/src/diskio.c:99: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, 0);
data/sanlock-3.8.2/src/diskio.c:229: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(disk->path, O_RDWR | O_DIRECT | O_SYNC, 0);
data/sanlock-3.8.2/src/diskio.c:268: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(disk->path, O_RDWR | O_DIRECT | O_SYNC, 0);
data/sanlock-3.8.2/src/diskio.c:365: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 off_str[16];
data/sanlock-3.8.2/src/diskio.c:366: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 ms_str[8];
data/sanlock-3.8.2/src/diskio.c:454: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 off_str[16];
data/sanlock-3.8.2/src/diskio.c:455: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 ms_str[8];
data/sanlock-3.8.2/src/diskio.c:614:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ms_str[8];
data/sanlock-3.8.2/src/diskio.c:615: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 off_str[16];
data/sanlock-3.8.2/src/diskio.c:831: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(iobuf, data, data_len);
data/sanlock-3.8.2/src/diskio.c:945:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(data, iobuf, data_len);
data/sanlock-3.8.2/src/helper.c:38: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[SANLK_HELPER_ARGS_LEN];
data/sanlock-3.8.2/src/helper.c:40: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/sanlock-3.8.2/src/helper.c:150: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[16];
data/sanlock-3.8.2/src/helper.h: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 path[SANLK_HELPER_PATH_LEN]; /* 128 */
data/sanlock-3.8.2/src/helper.h:31: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[SANLK_HELPER_ARGS_LEN]; /* 128 */
data/sanlock-3.8.2/src/helper.h:32: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 pad[240];
data/sanlock-3.8.2/src/leader.h:72:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char space_name[NAME_ID_SIZE]; /* lockspace for resource */
data/sanlock-3.8.2/src/leader.h:73:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char resource_name[NAME_ID_SIZE]; /* resource being locked */
data/sanlock-3.8.2/src/lockfile.c:33: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/sanlock-3.8.2/src/lockfile.c:34: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/sanlock-3.8.2/src/lockfile.c:59: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/sanlock-3.8.2/src/lockspace.c:142: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(disk, &sp->host_id_disk, sizeof(struct sync_disk));
data/sanlock-3.8.2/src/lockspace.c:235: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(hs_out, &sp->host_status[host_id-1], sizeof(struct host_status));
data/sanlock-3.8.2/src/lockspace.c:478: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(check_buf, sp->lease_status.renewal_read_buf, sp->align_size);
data/sanlock-3.8.2/src/lockspace.c:667: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 bitmap[HOSTID_BITMAP_SIZE];
data/sanlock-3.8.2/src/lockspace.c:692: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(task.name, sp->space_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/lockspace.c:871: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(sp->lease_status.renewal_read_buf, task.iobuf, sp->align_size);
data/sanlock-3.8.2/src/lockspace.c:964: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(sp->space_name, ls->name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/lockspace.c:965: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(&sp->host_id_disk, &ls->host_id_disk, sizeof(struct sanlk_disk));
data/sanlock-3.8.2/src/lockspace.c:1290: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(ls->name, sp->space_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/lockspace.c:1291: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(&ls->host_id_disk, &sp->host_id_disk, sizeof(struct sync_disk));
data/sanlock-3.8.2/src/lockspace.c:1768: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(&sp->host_event, he, sizeof(struct sanlk_host_event));
data/sanlock-3.8.2/src/lockspace.c:1795: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(&cb.he, he, sizeof(struct sanlk_host_event));
data/sanlock-3.8.2/src/log.c:32: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/sanlock-3.8.2/src/log.c:39: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/sanlock-3.8.2/src/log.c:45: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[LOG_STR_LEN];
data/sanlock-3.8.2/src/log.c:57: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[PATH_MAX];
data/sanlock-3.8.2/src/log.c:70: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_dump+log_point, log_str, len);
data/sanlock-3.8.2/src/log.c:107: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(e->str, log_str, len);
data/sanlock-3.8.2/src/log.c:124: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 + 1];
data/sanlock-3.8.2/src/log.c:233: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[LOG_STR_LEN];
data/sanlock-3.8.2/src/log.c:234: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(str, "dropped %d entries", num);
data/sanlock-3.8.2/src/log.c:248: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_dump+log_point, tail_len);
data/sanlock-3.8.2/src/log.c:250: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_dump, log_point);
data/sanlock-3.8.2/src/log.c:253: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_dump, log_point-1);
data/sanlock-3.8.2/src/log.c:261: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[LOG_STR_LEN];
data/sanlock-3.8.2/src/log.c:279: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(str, e->str, LOG_STR_LEN);
data/sanlock-3.8.2/src/log.c:304:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	logfile_fp = fopen(logfile_path, "a+");
data/sanlock-3.8.2/src/main.c:88: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 command[COMMAND_MAX];
data/sanlock-3.8.2/src/main.c:92: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 rand_state[32];
data/sanlock-3.8.2/src/main.c:146: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(hm.path, cl->killpath, SANLK_HELPER_PATH_LEN);
data/sanlock-3.8.2/src/main.c:147: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(hm.args, cl->killargs, SANLK_HELPER_ARGS_LEN);
data/sanlock-3.8.2/src/main.c:429: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 trash[64];
data/sanlock-3.8.2/src/main.c:468: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(&h, h_recv, sizeof(struct sm_header));
data/sanlock-3.8.2/src/main.c:1053: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(&ca->header, h_recv, sizeof(struct sm_header));
data/sanlock-3.8.2/src/main.c:1198: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(&ca->header, h_recv, sizeof(struct sm_header));
data/sanlock-3.8.2/src/main.c:1391: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(client[ci].owner_name, "listener");
data/sanlock-3.8.2/src/main.c:1458: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[37];
data/sanlock-3.8.2/src/main.c:1468: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(our_host_name_global, com.our_host_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/main.c:1485: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(our_host_name_global+ret, name.nodename, NAME_ID_SIZE-ret);
data/sanlock-3.8.2/src/main.c:1733: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(client[helper_ci].owner_name, "helper");
data/sanlock-3.8.2/src/main.c:1919: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 offstr[16];
data/sanlock-3.8.2/src/main.c:1980: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 offstr[16];
data/sanlock-3.8.2/src/main.c:2368:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			com.quiet_fail = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2371: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).
			com.debug_renew = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2374:31:  [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).
			com.renewal_history_size = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2377:27:  [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).
			log_logfile_priority = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2380:26:  [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).
			log_syslog_priority = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2386: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).
			com.all = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2387: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).
			com.aio_arg = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2392:29:  [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).
			com.max_worker_threads = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2397:23:  [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).
			com.use_watchdog = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2398: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).
			com.wait = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2402:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				com.get_hosts = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2404:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				com.high_priority = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2407: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).
			com.mlock_level = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2413:26:  [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).
				com.io_timeout_arg = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2419:29:  [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).
			com.set_bitmap_seconds = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2422:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			com.num_hosts = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2425:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			com.max_hosts = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2428: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).
			com.pid = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2446:11:  [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).
				sec = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2472: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).
			com.orphan = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2475:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			com.persistent = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2479: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).
			com.used = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2504: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).
			com.sector_size = atoi(optionarg);
data/sanlock-3.8.2/src/main.c:2690: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_CONF_LINE];
data/sanlock-3.8.2/src/main.c:2691: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_CONF_LINE];
data/sanlock-3.8.2/src/main.c:2698: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/sanlock-3.8.2/src/main.c:2703: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_CONF_LINE];
data/sanlock-3.8.2/src/main.c:2704: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_CONF_LINE];
data/sanlock-3.8.2/src/main.c:2718: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_CONF_LINE];
data/sanlock-3.8.2/src/main.c:2719: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_CONF_LINE];
data/sanlock-3.8.2/src/main.c:2729: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(SANLK_CONF_PATH, "r");
data/sanlock-3.8.2/src/main.c:2873: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).
				int num = atoi(str);
data/sanlock-3.8.2/src/main.c:2893: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 lsf_str[16];
data/sanlock-3.8.2/src/main.c:2898: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(lsf_str, "ADD ");
data/sanlock-3.8.2/src/main.c:2901: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(lsf_str, "REM ");
data/sanlock-3.8.2/src/main.c:3425: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/sanlock-3.8.2/src/main.c:3426: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 field[MAX_LINE];
data/sanlock-3.8.2/src/main.c:3427: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/sanlock-3.8.2/src/main.c:3433: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(com.file_path, "r");
data/sanlock-3.8.2/src/main.c:3532: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(leader, &lr, sizeof(lr));
data/sanlock-3.8.2/src/main.c:3804: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 version_str[64];
data/sanlock-3.8.2/src/main.c:3825:26:  [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).
	sanlock_version_major = atoi(major_str);
data/sanlock-3.8.2/src/main.c:3826:26:  [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).
	sanlock_version_minor = atoi(minor_str);
data/sanlock-3.8.2/src/main.c:3827:26:  [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).
	sanlock_version_patch = atoi(patch_str);
data/sanlock-3.8.2/src/ondisk.c:27: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(&magic_end, end, sizeof(uint32_t));
data/sanlock-3.8.2/src/ondisk.c:43: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(lr->space_name, end->space_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/ondisk.c:44: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(lr->resource_name, end->resource_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/ondisk.c:66: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(end->space_name, lr->space_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/ondisk.c:67: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(end->resource_name, lr->resource_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/ondisk.c:141: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(rh->lockspace_name, end->lockspace_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/ondisk.c:153: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(end->lockspace_name, rh->lockspace_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/ondisk.c:161: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(re->name, end->name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/ondisk.c:169:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(end->name, re->name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/paxos_lease.c:199: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(iobuf, (char *)&pd_end, sizeof(struct paxos_dblock));
data/sanlock-3.8.2/src/paxos_lease.c:200: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(iobuf + MBLOCK_OFFSET, (char *)&mb_end, sizeof(struct mode_block));
data/sanlock-3.8.2/src/paxos_lease.c:349: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(&pd_end, data + (i * sector_size),
data/sanlock-3.8.2/src/paxos_lease.c:354: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(&pds[i], &pd, sizeof(struct paxos_dblock));
data/sanlock-3.8.2/src/paxos_lease.c:457: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 bk_debug[BK_DEBUG_SIZE];
data/sanlock-3.8.2/src/paxos_lease.c:458: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 bk_str[BK_STR_SIZE];
data/sanlock-3.8.2/src/paxos_lease.c:466: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 *iobuf[SANLK_MAX_DISKS];
data/sanlock-3.8.2/src/paxos_lease.c:467: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 **p_iobuf[SANLK_MAX_DISKS];
data/sanlock-3.8.2/src/paxos_lease.c:876: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(dblock_out, &dblock, sizeof(struct paxos_dblock));
data/sanlock-3.8.2/src/paxos_lease.c:901: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(dblock_out, &dblock, sizeof(struct paxos_dblock));
data/sanlock-3.8.2/src/paxos_lease.c:1102: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(token->r.lockspace_name, leader.space_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/paxos_lease.c:1105: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(token->r.name, leader.resource_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/paxos_lease.c:1117: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(res->lockspace_name, leader.space_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/paxos_lease.c:1118: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(res->name, leader.resource_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/paxos_lease.c:1198: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(leader_ret, &leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:1283: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(&leader, &leaders[d], sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:1296: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(leader_ret, &leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:1338: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 bk_debug[BK_DEBUG_SIZE];
data/sanlock-3.8.2/src/paxos_lease.c:1339: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 bk_str[BK_STR_SIZE];
data/sanlock-3.8.2/src/paxos_lease.c:1368: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(&leader_end, iobuf, sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:1374: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(&our_dblock_end, iobuf + ((host_id + 1) * sector_size), sizeof(struct paxos_dblock));
data/sanlock-3.8.2/src/paxos_lease.c:1490: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(our_dblock, &dblock_one, sizeof(struct paxos_dblock));
data/sanlock-3.8.2/src/paxos_lease.c:1493: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(&leaders[d], &leader_one, sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:1524: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(leader_ret, &leaders[d], sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:1886: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(leader_ret, &cur_leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:2017: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(&tmp_leader, &cur_leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:2043: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(leader_ret, &tmp_leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:2044: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(dblock_ret, &dblock, sizeof(struct paxos_dblock));
data/sanlock-3.8.2/src/paxos_lease.c:2055: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(leader_ret, &tmp_leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:2118:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&new_leader, &cur_leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:2153: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(leader_ret, &new_leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:2171: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(leader_ret, &new_leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:2182: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(leader_ret, &new_leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:2183: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(dblock_ret, &dblock, sizeof(struct paxos_dblock));
data/sanlock-3.8.2/src/paxos_lease.c:2224: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(leader_ret, &new_leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:2392: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(leader.resource_name, resrename->name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/paxos_lease.c:2405: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(leader_ret, &leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:2489: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(iobuf, &leader_end, sizeof(struct leader_record));
data/sanlock-3.8.2/src/paxos_lease.c:2490: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(iobuf + sector_size, &rr_end, sizeof(struct request_record));
data/sanlock-3.8.2/src/resource.c:199: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(&leader_end, lease_buf, sizeof(struct leader_record));
data/sanlock-3.8.2/src/resource.c:469: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(iobuf, (char *)&pd_end, sizeof(struct paxos_dblock));
data/sanlock-3.8.2/src/resource.c:477: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(iobuf + MBLOCK_OFFSET, &mb_end, sizeof(struct mode_block));
data/sanlock-3.8.2/src/resource.c:575: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(mb_out, &mb, sizeof(struct mode_block));
data/sanlock-3.8.2/src/resource.c:724: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(r->lvb, lvb, lvblen);
data/sanlock-3.8.2/src/resource.c:762: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(lvb, r->lvb, len);
data/sanlock-3.8.2/src/resource.c:805: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(leader, &leader_tmp, sizeof(struct leader_record));
data/sanlock-3.8.2/src/resource.c:826: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(leader, &leader_tmp, sizeof(struct leader_record));
data/sanlock-3.8.2/src/resource.c:1254: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(d->path, s->path, SANLK_PATH_LEN);
data/sanlock-3.8.2/src/resource.c:1300: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->r, &token->r, sizeof(struct sanlk_resource));
data/sanlock-3.8.2/src/resource.c:1380: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->leader, &leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/resource.c:1381: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->dblock, &dblock, sizeof(dblock));
data/sanlock-3.8.2/src/resource.c:1792: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->killpath, killpath, SANLK_HELPER_PATH_LEN);
data/sanlock-3.8.2/src/resource.c:1793: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->killargs, killargs, SANLK_HELPER_ARGS_LEN);
data/sanlock-3.8.2/src/resource.c:1878: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(&r->leader, &leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/resource.c:1883: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->leader, &leader, sizeof(struct leader_record));
data/sanlock-3.8.2/src/resource.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(&r->dblock, &dblock, sizeof(dblock));
data/sanlock-3.8.2/src/resource.c:2113: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_out, &req, sizeof(struct request_record));
data/sanlock-3.8.2/src/resource.c:2123: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 killpath[SANLK_HELPER_PATH_LEN];
data/sanlock-3.8.2/src/resource.c:2124: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 killargs[SANLK_HELPER_ARGS_LEN];
data/sanlock-3.8.2/src/resource.c:2135: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(killpath, r->killpath, SANLK_HELPER_PATH_LEN);
data/sanlock-3.8.2/src/resource.c:2136: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(killargs, r->killargs, SANLK_HELPER_ARGS_LEN);
data/sanlock-3.8.2/src/resource.c:2163: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(hm.path, killpath, SANLK_HELPER_PATH_LEN);
data/sanlock-3.8.2/src/resource.c:2164: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(hm.args, killargs, SANLK_HELPER_ARGS_LEN);
data/sanlock-3.8.2/src/resource.c:2431: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(&rhe->he, he, sizeof(struct sanlk_host_event));
data/sanlock-3.8.2/src/resource.c:2502: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(&tt->r, &r->r, sizeof(struct sanlk_resource));
data/sanlock-3.8.2/src/resource.c:2540: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(&tt->r, &r->r, sizeof(struct sanlk_resource));
data/sanlock-3.8.2/src/rindex.c:63: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(token->r.lockspace_name, rx->ri->lockspace_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/rindex.c:64: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(token->r.name, "rindex_lease");
data/sanlock-3.8.2/src/rindex.c:73: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(token->disks[0].path, rx->disk->path, SANLK_PATH_LEN);
data/sanlock-3.8.2/src/rindex.c:104: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(token->r.lockspace_name, rx->ri->lockspace_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/rindex.c:105: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(token->r.name, res_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/rindex.c:114: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(token->disks[0].path, rx->disk->path, SANLK_PATH_LEN);
data/sanlock-3.8.2/src/rindex.c:227: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(re_new.name, re->name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/rindex.c:234: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(sector_iobuf, rindex_iobuf + sector_offset, sector_size);
data/sanlock-3.8.2/src/rindex.c:237: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(sector_iobuf + entry_offset_in_sector, &re_end, sizeof(struct rindex_entry));
data/sanlock-3.8.2/src/rindex.c:445: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(iobuf, &rh_end, sizeof(struct rindex_header));
data/sanlock-3.8.2/src/rindex.c:829:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(re_ret->name, re_in.name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/rindex.c:842: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(re_ret->name, re->name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/rindex.c:864: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(re_ret->name, re_in.name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/rindex.c:954: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(re_ret->name, re->name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/rindex.c:979: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 off_str[16];
data/sanlock-3.8.2/src/rindex.c:1108: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(re_new.name, res.name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/rindex.c:1114: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(rindex_iobuf + ent_offset, &re_end, sizeof(re_end));
data/sanlock-3.8.2/src/rindex_disk.h:93: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 lockspace_name[NAME_ID_SIZE];
data/sanlock-3.8.2/src/rindex_disk.h: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 name[NAME_ID_SIZE];
data/sanlock-3.8.2/src/sanlock.h:55: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[SANLK_PATH_LEN]; /* must include terminating \0 */
data/sanlock-3.8.2/src/sanlock.h:99: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 lockspace_name[SANLK_NAME_LEN]; /* terminating \0 not required */
data/sanlock-3.8.2/src/sanlock.h:100: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[SANLK_NAME_LEN]; /* terminating \0 not required */
data/sanlock-3.8.2/src/sanlock.h:123: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 lockspace_name[SANLK_NAME_LEN]; /* terminating \0 not required */
data/sanlock-3.8.2/src/sanlock.h:128: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[SANLK_NAME_LEN]; /* terminating \0 not required */
data/sanlock-3.8.2/src/sanlock.h: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 owner_name[SANLK_NAME_LEN]; /* optional user friendly name */
data/sanlock-3.8.2/src/sanlock.h:142: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[0];
data/sanlock-3.8.2/src/sanlock.h:157: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[SANLK_NAME_LEN];
data/sanlock-3.8.2/src/sanlock_internal.h:67: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[SANLK_PATH_LEN];
data/sanlock-3.8.2/src/sanlock_internal.h: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 shared_bitmap[HOSTID_BITMAP_SIZE]; /* bit set for host_id with SH */
data/sanlock-3.8.2/src/sanlock_internal.h:150: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 killpath[SANLK_HELPER_PATH_LEN]; /* copied from client */
data/sanlock-3.8.2/src/sanlock_internal.h:151: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 killargs[SANLK_HELPER_ARGS_LEN]; /* copied from client */
data/sanlock-3.8.2/src/sanlock_internal.h:182: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 owner_name[NAME_ID_SIZE];
data/sanlock-3.8.2/src/sanlock_internal.h:201: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 space_name[NAME_ID_SIZE];
data/sanlock-3.8.2/src/sanlock_internal.h:267: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+1];   /* for log messages */
data/sanlock-3.8.2/src/sanlock_internal.h:301: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 owner_name[SANLK_NAME_LEN+1];
data/sanlock-3.8.2/src/sanlock_internal.h:302: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 killpath[SANLK_HELPER_PATH_LEN];
data/sanlock-3.8.2/src/sanlock_internal.h:303: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 killargs[SANLK_HELPER_ARGS_LEN];
data/sanlock-3.8.2/src/sanlock_internal.h:390: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 our_host_name[SANLK_NAME_LEN+1];
data/sanlock-3.8.2/src/sanlock_internal.h:454: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 our_host_name_global[SANLK_NAME_LEN+1];
data/sanlock-3.8.2/src/sanlock_sock.h:92: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[SANLK_NAME_LEN]; /* client name or resource name */
data/sanlock-3.8.2/src/sanlock_sock.h:94: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[0]; /* string of internal state */
data/sanlock-3.8.2/src/watchdog.c:75: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[WDMD_NAME_SIZE];
data/sanlock-3.8.2/tests/devcount.c:29: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 count_path[PATH_MAX];
data/sanlock-3.8.2/tests/devcount.c:30: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 lock_path[PATH_MAX];
data/sanlock-3.8.2/tests/devcount.c:100: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[64];
data/sanlock-3.8.2/tests/devcount.c:240:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	sec1 = atoi(argv[3]);
data/sanlock-3.8.2/tests/devcount.c:241:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	sec2 = atoi(argv[4]);
data/sanlock-3.8.2/tests/devcount.c:242: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).
	our_hostid = atoi(argv[5]);
data/sanlock-3.8.2/tests/devcount.c:257: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(count_path, O_RDWR | O_DIRECT | O_SYNC, 0);
data/sanlock-3.8.2/tests/devcount.c:366: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(wbuf, rbuf, 512);
data/sanlock-3.8.2/tests/devcount.c:440: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(rbuf, wbuf, 512);
data/sanlock-3.8.2/tests/devcount.c:480: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(lockspace.name, "devcount");
data/sanlock-3.8.2/tests/devcount.c:524:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *av[COUNT_ARGS+1];
data/sanlock-3.8.2/tests/devcount.c:540: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).
	our_hostid = atoi(argv[7]);
data/sanlock-3.8.2/tests/devcount.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 *av[COUNT_ARGS+1];
data/sanlock-3.8.2/tests/devcount.c:731: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).
	our_hostid = atoi(argv[7]);
data/sanlock-3.8.2/tests/devcount.c:803: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[COUNT_ARGS+1];
data/sanlock-3.8.2/tests/devcount.c:815: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).
	our_hostid = atoi(argv[7]);
data/sanlock-3.8.2/tests/devcount.c:889: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 target_str[32];
data/sanlock-3.8.2/tests/devcount.c:890: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 state[1024];
data/sanlock-3.8.2/tests/devcount.c:900: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(target_str, " target=%d", target);
data/sanlock-3.8.2/tests/devcount.c:909: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(count_path, O_RDWR | O_DIRECT | O_SYNC, 0);
data/sanlock-3.8.2/tests/devcount.c:930: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(wbuf, state, strlen(state));
data/sanlock-3.8.2/tests/devcount.c:960: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(count_path, O_RDWR | O_DIRECT | O_SYNC, 0);
data/sanlock-3.8.2/tests/devcount.c:1013:8:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	val = atoi(val_str);
data/sanlock-3.8.2/tests/devcount.c:1055: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[MIGRATE_ARGS+1];
data/sanlock-3.8.2/tests/devcount.c:1072: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).
	our_hostid = atoi(argv[7]);
data/sanlock-3.8.2/tests/devcount.c:1073: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).
	max_hostid = atoi(argv[8]);
data/sanlock-3.8.2/tests/devcount.c:1219: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[128];
data/sanlock-3.8.2/tests/devcount.c:1226: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[128];
data/sanlock-3.8.2/tests/devcount.c:1233: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[128];
data/sanlock-3.8.2/tests/devcount.c:1240: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[COUNT_ARGS+1];
data/sanlock-3.8.2/tests/devcount.c:1245:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char result[5];
data/sanlock-3.8.2/tests/devcount.c:1254: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).
	our_hostid = atoi(argv[7]);
data/sanlock-3.8.2/tests/devcount.c:1404: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 resbuf[sizeof(struct sanlk_resource) + sizeof(struct sanlk_disk)];
data/sanlock-3.8.2/tests/devcount.c:1408: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[4096];
data/sanlock-3.8.2/tests/devcount.c:1455: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(ls.name, "devcount");
data/sanlock-3.8.2/tests/devcount.c:1474: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(res->lockspace_name, "devcount");
data/sanlock-3.8.2/tests/killpath.c: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 args[1024];
data/sanlock-3.8.2/tests/killpath.c:19:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char arg[1024];
data/sanlock-3.8.2/tests/killpath.c:40:8:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	pid = atoi(argv[argc-1]);
data/sanlock-3.8.2/tests/killpath.c:65: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).
		out = fopen("/tmp/client-state.txt", "a");
data/sanlock-3.8.2/tests/sanlk_client.c: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 rd[sizeof(struct sanlk_resource) + sizeof(struct sanlk_disk)];
data/sanlock-3.8.2/tests/sanlk_client.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 path[SANLK_HELPER_PATH_LEN];
data/sanlock-3.8.2/tests/sanlk_client.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 args[SANLK_HELPER_PATH_LEN];
data/sanlock-3.8.2/tests/sanlk_client.c:46:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	res->disks[0].offset = atoi(argv[4]);
data/sanlock-3.8.2/tests/sanlk_load.c:44: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 error_buf[4096];
data/sanlock-3.8.2/tests/sanlk_load.c:45: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 lock_disk_base[PATH_MAX];
data/sanlock-3.8.2/tests/sanlk_load.c:218:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[128];
data/sanlock-3.8.2/tests/sanlk_load.c:252:4:  [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, "lockspace%d:resource%d:", i, j);
data/sanlock-3.8.2/tests/sanlk_load.c:296: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(ls.name, "lockspace%d", i);
data/sanlock-3.8.2/tests/sanlk_load.c:322: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(ls.name, "lockspace%d", i);
data/sanlock-3.8.2/tests/sanlk_load.c:389: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 buf1[sizeof(struct sanlk_resource) + sizeof(struct sanlk_disk)];
data/sanlock-3.8.2/tests/sanlk_load.c:397: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(r1->lockspace_name, "lockspace%d", _s1);
data/sanlock-3.8.2/tests/sanlk_load.c:398: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(r1->name, "resource%d", _r1);
data/sanlock-3.8.2/tests/sanlk_load.c:427: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 buf1[sizeof(struct sanlk_resource) + sizeof(struct sanlk_disk)];
data/sanlock-3.8.2/tests/sanlk_load.c:428:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf2[sizeof(struct sanlk_resource) + sizeof(struct sanlk_disk)];
data/sanlock-3.8.2/tests/sanlk_load.c:446: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(r1->lockspace_name, "lockspace%d", _s1);
data/sanlock-3.8.2/tests/sanlk_load.c:447: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(r1->name, "resource%d", _r1);
data/sanlock-3.8.2/tests/sanlk_load.c:454: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(r2->lockspace_name, "lockspace%d", _s2);
data/sanlock-3.8.2/tests/sanlk_load.c:455: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(r2->name, "resource%d", _r2);
data/sanlock-3.8.2/tests/sanlk_load.c:732: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).
			our_hostid = atoi(optionarg);
data/sanlock-3.8.2/tests/sanlk_load.c:735: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).
			run_sec = atoi(optionarg);
data/sanlock-3.8.2/tests/sanlk_load.c:738: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).
			ls_count = atoi(optionarg);
data/sanlock-3.8.2/tests/sanlk_load.c:745:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			res_count = atoi(optionarg);
data/sanlock-3.8.2/tests/sanlk_load.c:752:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			pid_count = atoi(optionarg);
data/sanlock-3.8.2/tests/sanlk_load.c:759: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).
			one_mode = atoi(optionarg);
data/sanlock-3.8.2/tests/sanlk_load.c:762: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).
			error_range = atoi(optionarg);
data/sanlock-3.8.2/tests/sanlk_load.c:1024: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 resbuf[sizeof(struct sanlk_resource) + sizeof(struct sanlk_disk)];
data/sanlock-3.8.2/tests/sanlk_load.c:1035: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).
		ls_count = atoi(argv[3]);
data/sanlock-3.8.2/tests/sanlk_load.c:1037: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).
		res_count = atoi(argv[4]);
data/sanlock-3.8.2/tests/sanlk_load.c:1043: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(ls.name, "lockspace%d", i);
data/sanlock-3.8.2/tests/sanlk_load.c:1058:4:  [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(res->name, "resource%d", j);
data/sanlock-3.8.2/tests/sanlk_lockr.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 rd[sizeof(struct sanlk_resource) + sizeof(struct sanlk_disk)];
data/sanlock-3.8.2/tests/sanlk_lockr.c:45:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	res->disks[0].offset = atoi(argv[4]);
data/sanlock-3.8.2/tests/sanlk_lockr.c:47: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).
	sleep_sec = atoi(argv[5]);
data/sanlock-3.8.2/tests/sanlk_lvb.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 rd[sizeof(struct sanlk_resource) + sizeof(struct sanlk_disk)];
data/sanlock-3.8.2/tests/sanlk_lvb.c:28: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[512];
data/sanlock-3.8.2/tests/sanlk_lvb.c:55:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	res->disks[0].offset = atoi(argv[5]);
data/sanlock-3.8.2/tests/sanlk_lvb.c:60:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(filename, "r");
data/sanlock-3.8.2/tests/sanlk_lvb.c:63:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(filename, "w");
data/sanlock-3.8.2/tests/sanlk_path.c:25:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char dst_str[DSTMAXSIZE];
data/sanlock-3.8.2/tests/sanlk_path.c:76:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char dst_str[DSTMAXSIZE];
data/sanlock-3.8.2/tests/sanlk_rename.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 rd[sizeof(struct sanlk_resource) + sizeof(struct sanlk_disk)];
data/sanlock-3.8.2/tests/sanlk_rename.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 rd2[sizeof(struct sanlk_resource) + sizeof(struct sanlk_disk)];
data/sanlock-3.8.2/tests/sanlk_rename.c:55:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	res->disks[0].offset = atoi(argv[5]);
data/sanlock-3.8.2/wdmd/main.c:72: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 lockfile_path[PATH_MAX];
data/sanlock-3.8.2/wdmd/main.c:79: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 watchdog_path[WDPATH_SIZE];
data/sanlock-3.8.2/wdmd/main.c:80: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 option_path[WDPATH_SIZE];
data/sanlock-3.8.2/wdmd/main.c:81: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 saved_path[WDPATH_SIZE];
data/sanlock-3.8.2/wdmd/main.c:92: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/sanlock-3.8.2/wdmd/main.c:108: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[WDMD_NAME_SIZE];
data/sanlock-3.8.2/wdmd/main.c:269: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 debug_buf[DEBUG_SIZE];
data/sanlock-3.8.2/wdmd/main.c:273: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[LINE_SIZE];
data/sanlock-3.8.2/wdmd/main.c:372: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(client[ci].name, h.name, WDMD_NAME_SIZE);
data/sanlock-3.8.2/wdmd/main.c:394: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(&h_ret, &h, sizeof(h));
data/sanlock-3.8.2/wdmd/main.c:608: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/sanlock-3.8.2/wdmd/main.c:612: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/sanlock-3.8.2/wdmd/main.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/sanlock-3.8.2/wdmd/main.c:736: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/sanlock-3.8.2/wdmd/main.c:943: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(watchdog_path, O_WRONLY | O_CLOEXEC);
data/sanlock-3.8.2/wdmd/main.c:1109: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 | O_CLOEXEC);
data/sanlock-3.8.2/wdmd/main.c:1385: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/sanlock-3.8.2/wdmd/main.c:1400: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(lockfile_path, O_CREAT|O_WRONLY|O_CLOEXEC, 0644);
data/sanlock-3.8.2/wdmd/main.c:1592:30:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	            high_priority = atoi(optarg);
data/sanlock-3.8.2/wdmd/main.c:1595:23:  [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).
		    allow_scripts = atoi(optarg);
data/sanlock-3.8.2/wdmd/main.c:1601:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		    kill_script_sec = atoi(optarg);
data/sanlock-3.8.2/wdmd/wdmd_client.c: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[WDMD_NAME_SIZE];
data/sanlock-3.8.2/wdmd/wdmd_client.c:32:10:  [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).
		iter = atoi(argv[1]);
data/sanlock-3.8.2/wdmd/wdmd_sock.h:35:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[WDMD_NAME_SIZE];
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:168: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/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:189: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/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:192:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		umask(old_umask);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:195:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(old_umask);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:228: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/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:247:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(fd, &fdsi, sizeof(struct signalfd_siginfo));
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:315:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(fd, fifo_line, sizeof(fifo_line));
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:334:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(lease_path, val1, PATH_MAX-1);
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:433:49:  [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(de->d_name, "fence_sanlock.pid.", strlen("fence_sanlock.pid.")))
data/sanlock-3.8.2/fence_sanlock/fence_sanlockd.c:487:49:  [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 (rv != 1 || strncmp(name, "fence_sanlock", strlen("fence_sanlock"))) {
data/sanlock-3.8.2/python/sanlock.c:98: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).
    if ((size_t)size != strlen(data)) {
data/sanlock-3.8.2/python/sanlock.c:180:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(res_disk->path, PyBytes_AsString(path), SANLK_PATH_LEN - 1);
data/sanlock-3.8.2/python/sanlock.c:367:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(disk.path, PyBytes_AsString(path), SANLK_PATH_LEN - 1);
data/sanlock-3.8.2/python/sanlock.c:449:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ls.name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:450:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ls.host_id_disk.path, PyBytes_AsString(path), SANLK_PATH_LEN - 1);
data/sanlock-3.8.2/python/sanlock.c:502:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(res->lockspace_name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:503:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(res->name, PyBytes_AsString(resource), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:553:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ls.name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:554:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ls.host_id_disk.path, PyBytes_AsString(path), SANLK_PATH_LEN - 1);
data/sanlock-3.8.2/python/sanlock.c:607:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ls.host_id_disk.path, PyBytes_AsString(path), SANLK_PATH_LEN - 1);
data/sanlock-3.8.2/python/sanlock.c:677:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(res->disks[0].path, PyBytes_AsString(path), SANLK_PATH_LEN - 1);
data/sanlock-3.8.2/python/sanlock.c:756:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(res->lockspace_name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:757:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(res->name, PyBytes_AsString(resource), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:823:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ls.name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:824:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ls.host_id_disk.path, PyBytes_AsString(path), SANLK_PATH_LEN - 1);
data/sanlock-3.8.2/python/sanlock.c:877:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ls.name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:878:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ls.host_id_disk.path, PyBytes_AsString(path), SANLK_PATH_LEN - 1);
data/sanlock-3.8.2/python/sanlock.c:934:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ls.name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:935:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ls.host_id_disk.path, PyBytes_AsString(path), SANLK_PATH_LEN - 1);
data/sanlock-3.8.2/python/sanlock.c:1122:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(res->lockspace_name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:1123:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(res->name, PyBytes_AsString(resource), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:1189:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(res->lockspace_name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:1190:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(res->name, PyBytes_AsString(resource), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:1245:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(res->lockspace_name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:1246:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(res->name, PyBytes_AsString(resource), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:1317:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(res->lockspace_name, PyBytes_AsString(lockspace), SANLK_NAME_LEN);
data/sanlock-3.8.2/python/sanlock.c:1318:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(res->name, PyBytes_AsString(resource), SANLK_NAME_LEN);
data/sanlock-3.8.2/reset/sanlk_reset.h:34:41:  [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).
	update_addrlen = sizeof(sa_family_t) + strlen(update_addr.sun_path) + 1;
data/sanlock-3.8.2/reset/sanlk_resetd.c:435:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(fd, &fdsi, sizeof(struct signalfd_siginfo));
data/sanlock-3.8.2/src/client.c:284:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ls.name, ls_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/client.c:369:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ls.name, ls_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/client.c:792:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ls.name, ls_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/client.c:870:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ls.name, ls_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/client.c:917:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ls.name, ls_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/client.c:1830: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(src); i++) {
data/sanlock-3.8.2/src/client.c:1873: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(dst);
data/sanlock-3.8.2/src/client.c:1979: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(str) < 3)
data/sanlock-3.8.2/src/client.c:1983: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(str); i++) {
data/sanlock-3.8.2/src/client.c:2016: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(str);
data/sanlock-3.8.2/src/client.c:2040:24:  [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 (sub_count < 2 && strlen(sub) > SANLK_NAME_LEN)
data/sanlock-3.8.2/src/client.c:2042: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).
		if (sub_count >= 2 && (strlen(sub) > SANLK_PATH_LEN-1 || strlen(sub) < 1))
data/sanlock-3.8.2/src/client.c:2042:60:  [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 (sub_count >= 2 && (strlen(sub) > SANLK_PATH_LEN-1 || strlen(sub) < 1))
data/sanlock-3.8.2/src/client.c:2046:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(res->lockspace_name, sub, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/client.c:2049:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(res->name, sub, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/client.c:2060:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(res->disks[d].path, sub, SANLK_PATH_LEN - 1);
data/sanlock-3.8.2/src/client.c:2109: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(str) > SANLK_MAX_RES_STR - 1) {
data/sanlock-3.8.2/src/client.c:2116:4:  [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(state, " ");
data/sanlock-3.8.2/src/client.c:2144: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(res_state); i++) {
data/sanlock-3.8.2/src/client.c:2164: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(res_state);
data/sanlock-3.8.2/src/client.c:2246: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(str); i++) {
data/sanlock-3.8.2/src/client.c:2275:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ls->name, str, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/cmd.c:330:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cl->owner_name, opt.owner_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/cmd.c:806: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(str) > SANLK_MAX_RES_STR - 1) {
data/sanlock-3.8.2/src/cmd.c:808: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).
				  cl_ci, cl_fd, cl_pid, strlen(str));
data/sanlock-3.8.2/src/cmd.c:825:4:  [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(state, " ");
data/sanlock-3.8.2/src/cmd.c:832: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).
	state_strlen = strlen(state);
data/sanlock-3.8.2/src/cmd.c:2310: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/sanlock-3.8.2/src/cmd.c:2343: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/sanlock-3.8.2/src/cmd.c:2392: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/sanlock-3.8.2/src/cmd.c:2418: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/sanlock-3.8.2/src/cmd.c:2443: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/sanlock-3.8.2/src/cmd.c:2462: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/sanlock-3.8.2/src/cmd.c:2472:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(st.name, our_host_name_global, NAME_ID_SIZE);
data/sanlock-3.8.2/src/cmd.c:2495:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(st.name, cl->owner_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/cmd.c:2517:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(st.name, sp->space_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/cmd.c:2528:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(lockspace.name, sp->space_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/cmd.c:2551:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(st.name, r->r.name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/delta_lease.c:886:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(leader.space_name, ls->name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/direct.c:592: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(dump_path); i++) {
data/sanlock-3.8.2/src/direct.c:731:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(sname, lr->space_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/direct.c:732:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(rname, lr->resource_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/direct.c:755:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(sname, lr->space_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/direct.c:756:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(rname, lr->resource_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/direct.c:807:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(sname, rh->lockspace_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/direct.c:875:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(sd.path, path, SANLK_PATH_LEN);
data/sanlock-3.8.2/src/diskio.c:58: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/sanlock-3.8.2/src/diskio.c:64: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 ((len = strlen(buf)) && buf[len - 1] == '\n')
data/sanlock-3.8.2/src/diskio.c:67: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(buf)) {
data/sanlock-3.8.2/src/diskio.c:105: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/sanlock-3.8.2/src/diskio.c:480:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		rv = read(fd, buf + pos, len - pos);
data/sanlock-3.8.2/src/diskio.c:587:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant character.
		strncpy(off_str, "0", buflen);
data/sanlock-3.8.2/src/helper.c:57: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).
	args_len = strlen(args);
data/sanlock-3.8.2/src/helper.c:114:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(fd, hm, sizeof(struct helper_msg));
data/sanlock-3.8.2/src/lockfile.c:42:14:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	old_umask = umask(0002);
data/sanlock-3.8.2/src/lockfile.c:45:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		umask(old_umask);
data/sanlock-3.8.2/src/lockfile.c:48:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(old_umask);
data/sanlock-3.8.2/src/lockfile.c:88: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/sanlock-3.8.2/src/lockspace.c:375:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(hs->owner_name, leader->resource_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/lockspace.c:395:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(hs->owner_name, leader->resource_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/lockspace.c:826:4:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
			usleep(500000);
data/sanlock-3.8.2/src/lockspace.c:955: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).
			  strlen(ls->name), strlen(ls->host_id_disk.path));
data/sanlock-3.8.2/src/lockspace.c:955:24:  [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(ls->name), strlen(ls->host_id_disk.path));
data/sanlock-3.8.2/src/main.c:440:4:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
			usleep(1000);
data/sanlock-3.8.2/src/main.c:1643:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(client[ci].fd, &hs, sizeof(hs));
data/sanlock-3.8.2/src/main.c:1853:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(com.rentry.name, name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/main.c:1870: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(str); i++) {
data/sanlock-3.8.2/src/main.c:1894:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(com.rindex.lockspace_name, ls_name, SANLK_NAME_LEN);
data/sanlock-3.8.2/src/main.c:1923: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).
	int len = strlen(arg);
data/sanlock-3.8.2/src/main.c:1984: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).
	int len = strlen(arg);
data/sanlock-3.8.2/src/main.c:2343: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).
		if ((p[0] != '-') || (strlen(p) != 2)) {
data/sanlock-3.8.2/src/main.c:2437:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(com.our_host_name, optionarg, NAME_ID_SIZE);
data/sanlock-3.8.2/src/main.c:2568:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(command, cmd_argv[0], COMMAND_MAX - 1);
data/sanlock-3.8.2/src/main.c:2814:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(com.our_host_name, str, NAME_ID_SIZE);
data/sanlock-3.8.2/src/main.c:3482:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(lr.space_name, val, NAME_ID_SIZE);
data/sanlock-3.8.2/src/main.c:3485:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(lr.resource_name, val, NAME_ID_SIZE);
data/sanlock-3.8.2/src/main.c:3808:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(version_str, VERSION, 64);
data/sanlock-3.8.2/src/paxos_lease.c:2105: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(us);
data/sanlock-3.8.2/src/paxos_lease.c:2470:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(leader.space_name, token->r.lockspace_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/paxos_lease.c:2471:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(leader.resource_name, token->r.name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/resource.c:1846:5:  [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(us);
data/sanlock-3.8.2/src/rindex.c:440:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(rh.lockspace_name, rx.ri->lockspace_name, NAME_ID_SIZE);
data/sanlock-3.8.2/src/watchdog.c:146: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(500000);
data/sanlock-3.8.2/tests/devcount.c:109:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(child_stderr, buf, sizeof(buf));
data/sanlock-3.8.2/tests/devcount.c:130:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(fd, &fdsi, sizeof(struct signalfd_siginfo));
data/sanlock-3.8.2/tests/devcount.c:298:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(fd, rbuf, 512);
data/sanlock-3.8.2/tests/devcount.c:317:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			rv = read(fd, vbuf, 512);
data/sanlock-3.8.2/tests/devcount.c:447:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			rv = read(fd, vbuf, 512);
data/sanlock-3.8.2/tests/devcount.c:551:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(res->disks[0].path, lock_path, SANLK_PATH_LEN);
data/sanlock-3.8.2/tests/devcount.c:675: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(1000000);
data/sanlock-3.8.2/tests/devcount.c:742:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(res->disks[0].path, lock_path, SANLK_PATH_LEN);
data/sanlock-3.8.2/tests/devcount.c:826:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(res->disks[0].path, lock_path, SANLK_PATH_LEN);
data/sanlock-3.8.2/tests/devcount.c:904: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(state) > 512) {
data/sanlock-3.8.2/tests/devcount.c:930: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).
	memcpy(wbuf, state, strlen(state));
data/sanlock-3.8.2/tests/devcount.c:990:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(fd, rbuf, 512);
data/sanlock-3.8.2/tests/devcount.c:1084:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(res->disks[0].path, lock_path, SANLK_PATH_LEN);
data/sanlock-3.8.2/tests/devcount.c:1120:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			read(p2c[0], &junk, 1);
data/sanlock-3.8.2/tests/devcount.c:1267:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(res->disks[0].path, lock_path, SANLK_PATH_LEN);
data/sanlock-3.8.2/tests/devcount.c:1331:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(c2p[0], &result, 4);
data/sanlock-3.8.2/tests/sanlk_client.c:53:4:  [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(args, " ");
data/sanlock-3.8.2/tests/sanlk_load.c:197: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).
	int len = strlen(state);
data/sanlock-3.8.2/tests/sanlk_load.c:704: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).
		if ((p[0] != '-') || (strlen(p) != 2)) {
data/sanlock-3.8.2/tests/sanlk_path.c:31:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    dst_len = strlen(dst_exp);
data/sanlock-3.8.2/tests/sanlk_path.c:53:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    dst_len = strlen(dst_exp);
data/sanlock-3.8.2/tests/sanlk_path.c:82:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    dst_len = strlen(dst_exp);
data/sanlock-3.8.2/tests/sanlk_path.c:104:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    dst_len = strlen(dst_exp);
data/sanlock-3.8.2/tests/sanlk_string.c:71:4:  [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(state, " ");
data/sanlock-3.8.2/wdmd/client.c:53: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(name) > WDMD_NAME_SIZE)
data/sanlock-3.8.2/wdmd/client.c:58:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(h.name, name, WDMD_NAME_SIZE);
data/sanlock-3.8.2/wdmd/main.c:291: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).
	line_len = strlen(line);
data/sanlock-3.8.2/wdmd/main.c:310: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).
		line_len = strlen(line);
data/sanlock-3.8.2/wdmd/main.c:329: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).
		line_len = strlen(line);
data/sanlock-3.8.2/wdmd/main.c:402:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(client[ci].name, "dump", WDMD_NAME_SIZE);
data/sanlock-3.8.2/wdmd/main.c:490:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy(client[ci].name, "listen", WDMD_NAME_SIZE);
data/sanlock-3.8.2/wdmd/main.c:590: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/sanlock-3.8.2/wdmd/main.c:601:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(old_umask);
data/sanlock-3.8.2/wdmd/main.c:679:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(scripts[i].name, name, PATH_MAX);
data/sanlock-3.8.2/wdmd/main.c:991:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(watchdog_path, path, WDPATH_SIZE);
data/sanlock-3.8.2/wdmd/main.c:1228:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(fd, &fdsi, sizeof(struct signalfd_siginfo));
data/sanlock-3.8.2/wdmd/main.c:1263:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy(client[ci].name, "signal", WDMD_NAME_SIZE);
data/sanlock-3.8.2/wdmd/main.c:1390: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/sanlock-3.8.2/wdmd/main.c:1393:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		umask(old_umask);
data/sanlock-3.8.2/wdmd/main.c:1396:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(old_umask);
data/sanlock-3.8.2/wdmd/main.c:1429: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/sanlock-3.8.2/wdmd/main.c:1511:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	rv = write(STDOUT_FILENO, debug_buf, strlen(debug_buf));

ANALYSIS SUMMARY:

Hits = 778
Lines analyzed = 37328 in approximately 0.91 seconds (40822 lines/second)
Physical Source Lines of Code (SLOC) = 25764
Hits@level = [0] 629 [1] 164 [2] 484 [3]  13 [4] 105 [5]  12
Hits@level+ = [0+] 1407 [1+] 778 [2+] 614 [3+] 130 [4+] 117 [5+]  12
Hits/KSLOC@level+ = [0+] 54.6111 [1+] 30.1972 [2+] 23.8317 [3+] 5.0458 [4+] 4.54122 [5+] 0.465766
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.