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/libcgroup-0.41/include/libcgroup.h
Examining data/libcgroup-0.41/include/libcgroup/log.h
Examining data/libcgroup-0.41/include/libcgroup/iterators.h
Examining data/libcgroup-0.41/include/libcgroup/error.h
Examining data/libcgroup-0.41/include/libcgroup/groups.h
Examining data/libcgroup-0.41/include/libcgroup/init.h
Examining data/libcgroup-0.41/include/libcgroup/config.h
Examining data/libcgroup-0.41/include/libcgroup/tasks.h
Examining data/libcgroup-0.41/tests/libcg_ba.cpp
Examining data/libcgroup-0.41/tests/wrapper_test.c
Examining data/libcgroup-0.41/tests/test_functions.c
Examining data/libcgroup-0.41/tests/libcgrouptest01.c
Examining data/libcgroup-0.41/tests/walk_test.c
Examining data/libcgroup-0.41/tests/walk_task.c
Examining data/libcgroup-0.41/tests/get_mount_point.c
Examining data/libcgroup-0.41/tests/logger.c
Examining data/libcgroup-0.41/tests/get_variable_names.c
Examining data/libcgroup-0.41/tests/read_stats.c
Examining data/libcgroup-0.41/tests/get_all_controller.c
Examining data/libcgroup-0.41/tests/proctest.c
Examining data/libcgroup-0.41/tests/libcgrouptest.h
Examining data/libcgroup-0.41/tests/get_procs.c
Examining data/libcgroup-0.41/tests/setuid.c
Examining data/libcgroup-0.41/tests/test_named_hierarchy.c
Examining data/libcgroup-0.41/tests/get_controller.c
Examining data/libcgroup-0.41/src/pam/pam_cgroup.c
Examining data/libcgroup-0.41/src/tools/tools-common.h
Examining data/libcgroup-0.41/src/tools/cgget.c
Examining data/libcgroup-0.41/src/tools/lssubsys.c
Examining data/libcgroup-0.41/src/tools/lscgroup.c
Examining data/libcgroup-0.41/src/tools/cgclear.c
Examining data/libcgroup-0.41/src/tools/cgconfig.c
Examining data/libcgroup-0.41/src/tools/cgcreate.c
Examining data/libcgroup-0.41/src/tools/tools-common.c
Examining data/libcgroup-0.41/src/tools/cgsnapshot.c
Examining data/libcgroup-0.41/src/tools/cgclassify.c
Examining data/libcgroup-0.41/src/tools/cgset.c
Examining data/libcgroup-0.41/src/tools/cgexec.c
Examining data/libcgroup-0.41/src/tools/cgdelete.c
Examining data/libcgroup-0.41/src/lex.c
Examining data/libcgroup-0.41/src/config.c
Examining data/libcgroup-0.41/src/daemon/cgrulesengd.c
Examining data/libcgroup-0.41/src/daemon/cgrulesengd.h
Examining data/libcgroup-0.41/src/libcgroup-internal.h
Examining data/libcgroup-0.41/src/api.c
Examining data/libcgroup-0.41/src/log.c
Examining data/libcgroup-0.41/src/parse.c
Examining data/libcgroup-0.41/src/parse.h
Examining data/libcgroup-0.41/src/wrapper.c
Examining data/libcgroup-0.41/src/bindings/libcgroup.c

FINAL RESULTS:

data/libcgroup-0.41/src/api.c:125:9:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	return chown(filename, owner, group);
data/libcgroup-0.41/src/api.c:209:6:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	if (chmod(path, mode & mask))
data/libcgroup-0.41/src/api.c:3969:6:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	if (readlink(path, buf_cwd, sizeof(buf_cwd)) < 0)
data/libcgroup-0.41/src/api.c:4052:6:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	if (readlink(path, buf, sizeof(buf)) < 0) {
data/libcgroup-0.41/src/daemon/cgrulesengd.c:744:6:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	if (chown(CGRULE_CGRED_SOCKET_PATH, socket_user, socket_group) < 0) {
data/libcgroup-0.41/src/daemon/cgrulesengd.c:753:6:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	if (chmod(CGRULE_CGRED_SOCKET_PATH, 0660) < 0) {
data/libcgroup-0.41/src/tools/lssubsys.c:126: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(cont_names, ",", FILENAME_MAX-1);
data/libcgroup-0.41/src/tools/lssubsys.c:127: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(cont_names, info.name, FILENAME_MAX-1);
data/libcgroup-0.41/src/api.c:584: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.
		i = sscanf(itr, "%s%s%s", key, controllers, destination);
data/libcgroup-0.41/src/api.c:914:9:  [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.
		err = fscanf(proc_cgroup, "%s %d %d %d", subsys_name,
data/libcgroup-0.41/src/api.c:1392: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(tasks_path, path);
data/libcgroup-0.41/src/api.c:2406:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if (access(path, F_OK))
data/libcgroup-0.41/src/api.c:2717: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(output, input);
data/libcgroup-0.41/src/api.c:3293:9:  [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.
		ret = fscanf(pid_cgroup_fd, "%d:%[^:]:%s\n", &num, controllers,
data/libcgroup-0.41/src/api.c:4007: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(buf_cwd, buf_pname);
data/libcgroup-0.41/src/api.c:4117:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(addr.sun_path, CGRULE_CGRED_SOCKET_PATH);
data/libcgroup-0.41/src/api.c:4204: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.
	err = fscanf(proc_cgroup, "%s %d %d %d\n", subsys_name,
data/libcgroup-0.41/src/api.c:4281:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(cgroup_path, F_OK))
data/libcgroup-0.41/src/api.c:4487: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, cg_mount_table[i].mount.path);
data/libcgroup-0.41/src/api.c:4509: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, it->path);
data/libcgroup-0.41/src/bindings/libcgroup.c:657:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(r,name);
data/libcgroup-0.41/src/bindings/libcgroup.c:797:25:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  define PyOS_snprintf _snprintf
data/libcgroup-0.41/src/bindings/libcgroup.c:799:25:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  define PyOS_snprintf snprintf
data/libcgroup-0.41/src/bindings/libcgroup.c:816:9:  [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.
  res = vsnprintf(buf, sizeof(buf), fmt, ap);
data/libcgroup-0.41/src/config.c:573: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(config_mount_table[config_table_index].name, name);
data/libcgroup-0.41/src/config.c:574: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(config_mount_table[config_table_index].mount.path, mount_point);
data/libcgroup-0.41/src/config.c:604: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(config_namespace_table[namespace_table_index].name, name);
data/libcgroup-0.41/src/config.c:605: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(config_namespace_table[namespace_table_index].mount.path,
data/libcgroup-0.41/src/config.c:1488:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy((template_table[i]).name,
data/libcgroup-0.41/src/config.c:1552:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy((template_table[i]).name,
data/libcgroup-0.41/src/daemon/cgrulesengd.c:97:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(fd, msg, ap);
data/libcgroup-0.41/src/daemon/cgrulesengd.c:143:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(logfile, format, ap);
data/libcgroup-0.41/src/daemon/cgrulesengd.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(saddr.sun_path, CGRULE_CGRED_SOCKET_PATH);
data/libcgroup-0.41/src/log.c:30:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stdout, fmt, ap);
data/libcgroup-0.41/src/tools/cgexec.c:172:8:  [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.
	ret = execvp(argv[optind], &argv[optind]);
data/libcgroup-0.41/src/tools/cgsnapshot.c:113:9:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		ret = sscanf(buf, "%s", name);
data/libcgroup-0.41/src/wrapper.c:381:8:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
			if (sscanf(val->value, "%" SCNd64, value) != 1)
data/libcgroup-0.41/src/wrapper.c:404:10:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			ret = snprintf(val->value,
data/libcgroup-0.41/src/wrapper.c:430:8:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
			if (sscanf(val->value, "%" SCNu64, value) != 1)
data/libcgroup-0.41/src/wrapper.c:453:10:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			ret = snprintf(val->value,
data/libcgroup-0.41/tests/libcg_ba.cpp:32:26:  [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.
#define cgroup_dbg(p...)	printf(p...)
data/libcgroup-0.41/tests/libcg_ba.cpp:126: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(cgroup_name, name.c_str());
data/libcgroup-0.41/tests/libcgrouptest.h:153:26:  [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.
#define cgroup_dbg(p...)	printf(p)
data/libcgroup-0.41/tests/logger.c:26:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(fmt, ap);
data/libcgroup-0.41/tests/test_functions.c:335:3:  [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.
		fscanf(fd, "%s, %d, %d, %d", subsys_name,
data/libcgroup-0.41/tests/test_functions.c:442:3:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
		fscanf(fd, "%" SCNi64, &int64_val);
data/libcgroup-0.41/tests/test_functions.c:447:3:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
		fscanf(fd, "%" SCNu64, &uint64_val);
data/libcgroup-0.41/tests/test_functions.c:452:3:  [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.
		fscanf(fd, "%s", string_val);
data/libcgroup-0.41/tests/test_named_hierarchy.c:41:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access("/cgroup/test", F_OK))
data/libcgroup-0.41/tests/walk_test.c:47: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(root, info.full_path);
data/libcgroup-0.41/tests/walk_test.c:72:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(root, info.full_path);
data/libcgroup-0.41/tests/walk_test.c:89: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(root, info.full_path);
data/libcgroup-0.41/tests/walk_test.c:109: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(root, info.full_path);
data/libcgroup-0.41/src/api.c:4008:9:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
			if (!realpath(buf_cwd, path)) {
data/libcgroup-0.41/src/daemon/cgrulesengd.c:1086:20:  [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.
	char *level_str = getenv("CGROUP_LOGLEVEL");
data/libcgroup-0.41/src/daemon/cgrulesengd.c:1097: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, short_options, long_options, NULL);
data/libcgroup-0.41/src/log.c:90:21:  [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.
		char *level_str = getenv("CGROUP_LOGLEVEL");
data/libcgroup-0.41/src/parse.c:371:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if ((yys = getenv("YYDEBUG")) != 0)
data/libcgroup-0.41/src/tools/cgclassify.c:139:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "+g:sh", longopts, NULL)) > 0) {
data/libcgroup-0.41/src/tools/cgclear.c:83:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "hl:L:e", longopts, NULL)) > 0) {
data/libcgroup-0.41/src/tools/cgconfig.c:101:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "hl:L:t:a:d:f:s:", options,
data/libcgroup-0.41/src/tools/cgcreate.c:105:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "a:t:g:hd:f:s:", long_opts, NULL))
data/libcgroup-0.41/src/tools/cgdelete.c:86:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "rhg:",
data/libcgroup-0.41/src/tools/cgexec.c:75:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "+g:sh", longopts, NULL)) > 0) {
data/libcgroup-0.41/src/tools/cgget.c:331:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "r:hnvg:a", long_options, NULL))
data/libcgroup-0.41/src/tools/cgset.c:98:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long (argc, argv,
data/libcgroup-0.41/src/tools/cgsnapshot.c:746:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "hsb:w:tf:", long_opts, NULL))
data/libcgroup-0.41/src/tools/lscgroup.c:270:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "hg:", options, NULL)) > 0) {
data/libcgroup-0.41/src/tools/lssubsys.c:247:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "mMhai", options, NULL)) > 0) {
data/libcgroup-0.41/include/libcgroup/iterators.h: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 name[FILENAME_MAX];
data/libcgroup-0.41/include/libcgroup/iterators.h:234:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char value[CG_VALUE_MAX];
data/libcgroup-0.41/include/libcgroup/iterators.h:312:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/include/libcgroup/iterators.h:314:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/include/libcgroup/iterators.h:356:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:61:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 __thread char errtext[MAXLEN];
data/libcgroup-0.41/src/api.c:79:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
__thread char *cg_namespace_table[CG_CONTROLLER_MAX];
data/libcgroup-0.41/src/api.c:266:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *fts_path[2];
data/libcgroup-0.41/src/api.c:493:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buff[CGROUP_RULE_MAXLINE] = { '\0' };
data/libcgroup-0.41/src/api.c:514:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char key[CGROUP_RULE_MAXKEY] = { '\0' };
data/libcgroup-0.41/src/api.c:515:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char user[LOGIN_NAME_MAX] = { '\0' };
data/libcgroup-0.41/src/api.c:516:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char controllers[CG_CONTROLLER_MAX] = { '\0' };
data/libcgroup-0.41/src/api.c:517:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char destination[FILENAME_MAX] = { '\0' };
data/libcgroup-0.41/src/api.c:553:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(CGRULES_CONF_FILE, "re");
data/libcgroup-0.41/src/api.c:852: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 *controllers[CG_CONTROLLER_MAX];
data/libcgroup-0.41/src/api.c:854:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char subsys_name[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:862:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char mntent_buffer[4 * FILENAME_MAX];
data/libcgroup-0.41/src/api.c:880:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	proc_cgroup = fopen("/proc/cgroups", "re");
data/libcgroup-0.41/src/api.c:923: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).
	proc_mount = fopen("/proc/mounts", "re");
data/libcgroup-0.41/src/api.c:1078:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char mntent_buff[4 * FILENAME_MAX];
data/libcgroup-0.41/src/api.c:1081: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).
	proc_mount = fopen("/proc/mounts", "re");
data/libcgroup-0.41/src/api.c:1182: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).
	tasks = fopen(path, "we");
data/libcgroup-0.41/src/api.c:1224:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:1367:17:  [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).
	control_file = fopen(path, "r+e");
data/libcgroup-0.41/src/api.c:1393:4:  [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(tasks_path, "/tasks");
data/libcgroup-0.41/src/api.c:1396:19:  [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).
			control_file = fopen(tasks_path, "re");
data/libcgroup-0.41/src/api.c:1436:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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, base[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:1574:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *fts_path[2];
data/libcgroup-0.41/src/api.c:1771:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char child_path[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:1939:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:1952:18:  [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).
		delete_tasks = fopen(path, "re");
data/libcgroup-0.41/src/api.c:2015:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char child_name[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:2082:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char parent_path[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:2160:19:  [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).
			parent_tasks = fopen(parent_path, "we");
data/libcgroup-0.41/src/api.c:2227:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:2235:14:  [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).
	ctrl_file = fopen(path, "re");
data/libcgroup-0.41/src/api.c:2277:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX+1];
data/libcgroup-0.41/src/api.c:2375:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:2676:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:2725:51:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 int add_controller(struct cgroup **pgroup, char *group_name,
data/libcgroup-0.41/src/api.c:2726:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char controller_name[FILENAME_MAX])
data/libcgroup-0.41/src/api.c:2868:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char newdest[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:3273:18:  [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).
	pid_cgroup_fd = fopen(path, "re");
data/libcgroup-0.41/src/api.c:3287:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char controllers[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:3288:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char cgroup_path[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:3447:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *cg_path[2];
data/libcgroup-0.41/src/api.c:3448:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char full_path[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:3608:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char stat_file[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:3609:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char stat_path[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:3623:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(stat_file, "re");
data/libcgroup-0.41/src/api.c:3683:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char stat_file[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:3684:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char stat_path[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:3699:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(stat_file, "re");
data/libcgroup-0.41/src/api.c:3750:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:3766:21:  [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).
	*handle = (void *) fopen(fullpath, "re");
data/libcgroup-0.41/src/api.c:3862:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:3863:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[4092];
data/libcgroup-0.41/src/api.c:3869: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(path, "/proc/%d/status", pid);
data/libcgroup-0.41/src/api.c:3870:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = fopen(path, "re");
data/libcgroup-0.41/src/api.c:3918:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:3919:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[4092];
data/libcgroup-0.41/src/api.c:3921: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(path, "/proc/%d/status", pid);
data/libcgroup-0.41/src/api.c:3922:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = fopen(path, "re");
data/libcgroup-0.41/src/api.c:3963:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:3964:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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_pname[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:3965:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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_cwd[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:3968: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(path, "/proc/%d/cwd", pid);
data/libcgroup-0.41/src/api.c:3972: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(path, "/proc/%d/cmdline", pid);
data/libcgroup-0.41/src/api.c:3973:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = fopen(path, "re");
data/libcgroup-0.41/src/api.c:4040:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:4041:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:4051: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(path, "/proc/%d/exe", pid);
data/libcgroup-0.41/src/api.c:4108:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buff[sizeof(CGRULE_SUCCESS_STORE_PID)];
data/libcgroup-0.41/src/api.c:4196:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char subsys_name[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:4223:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:4229:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	proc_cgroup = fopen("/proc/cgroups", "re");
data/libcgroup-0.41/src/api.c:4268:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cgroup_path[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:4293: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).
	procs = fopen(cgroup_path, "r");
data/libcgroup-0.41/src/bindings/libcgroup.c:608:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static const char hex[17] = "0123456789abcdef";
data/libcgroup-0.41/src/bindings/libcgroup.c:769: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(newstr, cstr, len+1);
data/libcgroup-0.41/src/bindings/libcgroup.c:813:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[SWIG_PYBUFFER_SIZE * 2];
data/libcgroup-0.41/src/bindings/libcgroup.c:1962:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char result[SWIG_BUFFER_SIZE];
data/libcgroup-0.41/src/bindings/libcgroup.c:1976:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char result[SWIG_BUFFER_SIZE];
data/libcgroup-0.41/src/bindings/libcgroup.c:1987:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char result[SWIG_BUFFER_SIZE];
data/libcgroup-0.41/src/bindings/libcgroup.c:2121:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pack, ptr, size);
data/libcgroup-0.41/src/bindings/libcgroup.c:2139:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ptr, sobj->pack, size);
data/libcgroup-0.41/src/bindings/libcgroup.c:2775: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 mesg[256];
data/libcgroup-0.41/src/bindings/libcgroup.c:2976:19:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    return (int *)memcpy((int *)malloc(sizeof(int)),&value,sizeof(int));
data/libcgroup-0.41/src/bindings/libcgroup.c:3226:22:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
data/libcgroup-0.41/src/bindings/libcgroup.c:3299:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	if (csize) memcpy(val, cptr, csize*sizeof(char));
data/libcgroup-0.41/src/bindings/libcgroup.c:3594:40:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    arg1->path = (char const *)(char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size));
data/libcgroup-0.41/src/bindings/libcgroup.c:3654:42:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    arg1->parent = (char const *)(char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size));
data/libcgroup-0.41/src/bindings/libcgroup.c:3714:45:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    arg1->full_path = (char const *)(char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size));
data/libcgroup-0.41/src/bindings/libcgroup.c:4202:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char temp2[FILENAME_MAX] ;
data/libcgroup-0.41/src/bindings/libcgroup.c:4218:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if (arg2) memcpy(arg1->name,arg2,FILENAME_MAX*sizeof(char));
data/libcgroup-0.41/src/bindings/libcgroup.c:4261:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char temp2[100] ;
data/libcgroup-0.41/src/bindings/libcgroup.c:4277:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if (arg2) memcpy(arg1->value,arg2,100*sizeof(char));
data/libcgroup-0.41/src/bindings/libcgroup.c:4607:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char temp2[FILENAME_MAX] ;
data/libcgroup-0.41/src/bindings/libcgroup.c:4623:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if (arg2) memcpy(arg1->name,arg2,FILENAME_MAX*sizeof(char));
data/libcgroup-0.41/src/bindings/libcgroup.c:4666:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char temp2[FILENAME_MAX] ;
data/libcgroup-0.41/src/bindings/libcgroup.c:4682:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if (arg2) memcpy(arg1->path,arg2,FILENAME_MAX*sizeof(char));
data/libcgroup-0.41/src/bindings/libcgroup.c:4865:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char temp2[FILENAME_MAX] ;
data/libcgroup-0.41/src/bindings/libcgroup.c:4881:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if (arg2) memcpy(arg1->name,arg2,FILENAME_MAX*sizeof(char));
data/libcgroup-0.41/src/config.c:323: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).
	long val = atoi(value);
data/libcgroup-0.41/src/config.c:324:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[CGROUP_BUFFER_LEN];
data/libcgroup-0.41/src/config.c:437: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).
	long val = atoi(value);
data/libcgroup-0.41/src/config.c:438:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[CGROUP_BUFFER_LEN];
data/libcgroup-0.41/src/config.c:1009: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).
	yyin = fopen(pathname, "re");
data/libcgroup-0.41/src/config.c:1297:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/config.c:1585:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[FILENAME_MAX];
data/libcgroup-0.41/src/daemon/cgrulesengd.c:339: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(&array_unch.proc[j],
data/libcgroup-0.41/src/daemon/cgrulesengd.c:554:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buff[BUFF_SIZE];
data/libcgroup-0.41/src/daemon/cgrulesengd.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 path[FILENAME_MAX];
data/libcgroup-0.41/src/daemon/cgrulesengd.c:621: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(path, "/proc/%d", pid);
data/libcgroup-0.41/src/daemon/cgrulesengd.c:655:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buff[BUFF_SIZE];
data/libcgroup-0.41/src/daemon/cgrulesengd.c:777: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(&fds, &readfds, sizeof(fd_set));
data/libcgroup-0.41/src/daemon/cgrulesengd.c:827:14:  [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 = fopen(logp, "a");
data/libcgroup-0.41/src/libcgroup-internal.h: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[FILENAME_MAX];
data/libcgroup-0.41/src/libcgroup-internal.h:76:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char value[CG_VALUE_MAX];
data/libcgroup-0.41/src/libcgroup-internal.h:81:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/libcgroup-internal.h:88:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/libcgroup-internal.h:101:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/libcgroup-internal.h:107:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/libcgroup-internal.h:129:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char username[LOGIN_NAME_MAX];
data/libcgroup-0.41/src/libcgroup-internal.h:130:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char destination[FILENAME_MAX];
data/libcgroup-0.41/src/libcgroup-internal.h:131:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *controllers[MAX_MNT_ELEMENTS];
data/libcgroup-0.41/src/libcgroup-internal.h:218:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 __thread char *cg_namespace_table[CG_CONTROLLER_MAX];
data/libcgroup-0.41/src/tools/cgget.c:66:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[LL_MAX];
data/libcgroup-0.41/src/tools/cgset.c:29:51:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 struct cgroup *copy_name_value_from_cgroup(char src_cg_path[FILENAME_MAX])
data/libcgroup-0.41/src/tools/cgset.c:86:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char src_cg_path[FILENAME_MAX];
data/libcgroup-0.41/src/tools/cgsnapshot.c:48: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.
typedef char cont_name_t[FILENAME_MAX];
data/libcgroup-0.41/src/tools/cgsnapshot.c:86:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/tools/cgsnapshot.c:87:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/tools/cgsnapshot.c:93:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fw = fopen(filename, "r");
data/libcgroup-0.41/src/tools/cgsnapshot.c:216:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tasks_path[FILENAME_MAX];
data/libcgroup-0.41/src/tools/cgsnapshot.c:304:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char controller[CG_CONTROLLER_MAX][FILENAME_MAX],
data/libcgroup-0.41/src/tools/cgsnapshot.c:315:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char var_path[FILENAME_MAX];
data/libcgroup-0.41/src/tools/cgsnapshot.c:447:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char controller[CG_CONTROLLER_MAX][FILENAME_MAX],
data/libcgroup-0.41/src/tools/cgsnapshot.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 cgroup_name[FILENAME_MAX];
data/libcgroup-0.41/src/tools/cgsnapshot.c:513:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 int is_ctlr_on_list(char controllers[CG_CONTROLLER_MAX][FILENAME_MAX],
data/libcgroup-0.41/src/tools/cgsnapshot.c:539:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/tools/cgsnapshot.c:542:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char controllers[CG_CONTROLLER_MAX][FILENAME_MAX];
data/libcgroup-0.41/src/tools/cgsnapshot.c:598:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FILENAME_MAX];
data/libcgroup-0.41/src/tools/cgsnapshot.c:728:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char bl_file[FILENAME_MAX];  /* blacklist file name */
data/libcgroup-0.41/src/tools/cgsnapshot.c:729:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char wl_file[FILENAME_MAX];  /* whitelist file name */
data/libcgroup-0.41/src/tools/cgsnapshot.c:770: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).
			of = fopen(optarg, "w");
data/libcgroup-0.41/src/tools/lscgroup.c:89:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cgroup_dir_path[FILENAME_MAX];
data/libcgroup-0.41/src/tools/lscgroup.c:90:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char input_dir_path[FILENAME_MAX];
data/libcgroup-0.41/src/tools/lscgroup.c:130:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char path[FILENAME_MAX];
data/libcgroup-0.41/src/tools/lscgroup.c:131:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char con_name[FILENAME_MAX];
data/libcgroup-0.41/src/tools/lscgroup.c:132:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char all_conts[FILENAME_MAX];
data/libcgroup-0.41/src/tools/lssubsys.c:30: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.
typedef char cont_name_t[FILENAME_MAX];
data/libcgroup-0.41/src/tools/lssubsys.c:58:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char path[FILENAME_MAX];
data/libcgroup-0.41/src/tools/lssubsys.c:150:46:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 int cgroup_list_all_controllers(const char *tname,
data/libcgroup-0.41/src/tools/tools-common.h: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 path[FILENAME_MAX];
data/libcgroup-0.41/src/tools/tools-common.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 *controllers[CG_CONTROLLER_MAX];
data/libcgroup-0.41/src/wrapper.c:533:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char con[FILENAME_MAX];
data/libcgroup-0.41/tests/get_mount_point.c:11:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char string[100];
data/libcgroup-0.41/tests/get_mount_point.c:13: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(string, "cpu");
data/libcgroup-0.41/tests/get_mount_point.c:31: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(string, "obviouslynonexistsubsys");
data/libcgroup-0.41/tests/libcgrouptest.h:96:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char val_string[100];	/* string value of control parameter */
data/libcgroup-0.41/tests/libcgrouptest.h:102: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 info[NUM_MSGS][SIZE];
data/libcgroup-0.41/tests/libcgrouptest01.c:25: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 mountpoint[FILENAME_MAX], mountpoint2[FILENAME_MAX];
data/libcgroup-0.41/tests/libcgrouptest01.c:36: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(cval.val_string, "200000");
data/libcgroup-0.41/tests/libcgrouptest01.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 controller_name[FILENAME_MAX], control_file[FILENAME_MAX];
data/libcgroup-0.41/tests/libcgrouptest01.c:46:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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_control_file[FILENAME_MAX];
data/libcgroup-0.41/tests/libcgrouptest01.c:51:35:  [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 ((argc < 2) || (argc > 6) || (atoi(argv[1]) < 0)) {
data/libcgroup-0.41/tests/libcgrouptest01.c:56: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).
	fs_mounted = atoi(argv[1]);
data/libcgroup-0.41/tests/libcgrouptest01.c:61: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).
		ctl1 = atoi(argv[2]);
data/libcgroup-0.41/tests/libcgrouptest01.c:62: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).
		ctl2 = atoi(argv[3]);
data/libcgroup-0.41/tests/libcgrouptest01.c:652:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char path1_control_file[FILENAME_MAX], path2_control_file[FILENAME_MAX];
data/libcgroup-0.41/tests/libcgrouptest01.c:653:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char controller_name[FILENAME_MAX], control_file[FILENAME_MAX];
data/libcgroup-0.41/tests/logger.c:39: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).
			loglevel = atoi(argv[i]);
data/libcgroup-0.41/tests/proctest.c:36: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(argv[i]);
data/libcgroup-0.41/tests/read_stats.c:41:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cgroup_path[FILENAME_MAX];
data/libcgroup-0.41/tests/test_functions.c:72:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tasksfile[FILENAME_MAX], tasksfile2[FILENAME_MAX];
data/libcgroup-0.41/tests/test_functions.c:139:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char group[FILENAME_MAX];
data/libcgroup-0.41/tests/test_functions.c:140:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char controller_name[FILENAME_MAX], control_file[FILENAME_MAX];
data/libcgroup-0.41/tests/test_functions.c:186:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char path1_group[FILENAME_MAX], path2_group[FILENAME_MAX];
data/libcgroup-0.41/tests/test_functions.c:260:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char path1_group[FILENAME_MAX], path2_group[FILENAME_MAX];
data/libcgroup-0.41/tests/test_functions.c:328:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char subsys_name[FILENAME_MAX];
data/libcgroup-0.41/tests/test_functions.c:330:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = fopen("/proc/cgroups", "r");
data/libcgroup-0.41/tests/test_functions.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 string_val[100];
data/libcgroup-0.41/tests/test_functions.c:426:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = fopen(path_control_file, "r");
data/libcgroup-0.41/tests/test_functions.c:528:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char wr[SIZE];
data/libcgroup-0.41/tests/test_functions.c:582:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char entry_buffer[FILENAME_MAX * 4];
data/libcgroup-0.41/tests/test_functions.c:592:14:  [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).
	proc_file = fopen("/proc/mounts", "r");
data/libcgroup-0.41/tests/test_functions.c:635: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(tasksfile, "r");
data/libcgroup-0.41/tests/test_functions.c:669:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char res[10];
data/libcgroup-0.41/tests/test_functions.c:670:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[2*SIZE];
data/libcgroup-0.41/tests/test_functions.c:721: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(cval.val_string, "5000");
data/libcgroup-0.41/tests/test_functions.c:725:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char controller_name[FILENAME_MAX], control_file[FILENAME_MAX];
data/libcgroup-0.41/tests/test_functions.c:726:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char wr[SIZE], extra[] = "in cgroup_compare_cgroup";
data/libcgroup-0.41/tests/test_functions.c:794:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char controller_name[FILENAME_MAX], control_file[FILENAME_MAX];
data/libcgroup-0.41/tests/walk_test.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 root[FILENAME_MAX];
data/libcgroup-0.41/src/api.c:192:10:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		mode_t umask, gmask, omask;
data/libcgroup-0.41/src/api.c:203:11:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		gmask = umask >> 3;
data/libcgroup-0.41/src/api.c:206:10:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		mask = umask|gmask|omask|S_ISUID|S_ISGID|S_ISVTX;
data/libcgroup-0.41/src/api.c:461: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(itr))
data/libcgroup-0.41/src/api.c:596:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			len_procname = strlen(procname);
data/libcgroup-0.41/src/api.c:604:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			len_username = strlen(key);
data/libcgroup-0.41/src/api.c:609:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(user, key, len_username);
data/libcgroup-0.41/src/api.c:729:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(newrule->username, user, len_username);
data/libcgroup-0.41/src/api.c:743:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(newrule->destination, destination,
data/libcgroup-0.41/src/api.c:764:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
							strlen(stok_buff) + 1);
data/libcgroup-0.41/src/api.c:822:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(mount->path, path, sizeof(mount->path));
data/libcgroup-0.41/src/api.c:975:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(cg_mount_table[found_mnt].name,
data/libcgroup-0.41/src/api.c:978:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(cg_mount_table[found_mnt].mount.path,
data/libcgroup-0.41/src/api.c:1029:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(cg_mount_table[found_mnt].name,
data/libcgroup-0.41/src/api.c:1032:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(cg_mount_table[found_mnt].mount.path,
data/libcgroup-0.41/src/api.c:1121:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((suf[strlen(suf)-1] == '/') ||
data/libcgroup-0.41/src/api.c:1122:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		((strlen(suf) == 0) && (pref[strlen(pref)-1] == '/'))) {
data/libcgroup-0.41/src/api.c:1122:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		((strlen(suf) == 0) && (pref[strlen(pref)-1] == '/'))) {
data/libcgroup-0.41/src/api.c:1238:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
			strncat(path, "/tasks", sizeof(path) - strlen(path));
data/libcgroup-0.41/src/api.c:1238:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			strncat(path, "/tasks", sizeof(path) - strlen(path));
data/libcgroup-0.41/src/api.c:1259:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
			strncat(path, "/tasks", sizeof(path) - strlen(path));
data/libcgroup-0.41/src/api.c:1259:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			strncat(path, "/tasks", sizeof(path) - strlen(path));
data/libcgroup-0.41/src/api.c:1387:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			tasks_path = (char *)malloc(strlen(path) + 6 + 1);
data/libcgroup-0.41/src/api.c:1502:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(dst->name, src->name, FILENAME_MAX);
data/libcgroup-0.41/src/api.c:1515:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(dst_val->value, src_val->value, CG_VALUE_MAX);
data/libcgroup-0.41/src/api.c:1516:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(dst_val->name, src_val->name, FILENAME_MAX);
data/libcgroup-0.41/src/api.c:1735: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(cgroup->name) == 0 || !strcmp(cgroup->name, pdir)) {
data/libcgroup-0.41/src/api.c:1950:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
		strncat(path, "tasks", sizeof(path) - strlen(path));
data/libcgroup-0.41/src/api.c:1950: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).
		strncat(path, "tasks", sizeof(path) - strlen(path));
data/libcgroup-0.41/src/api.c:2031: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).
	group_len = strlen(info.full_path);
data/libcgroup-0.41/src/api.c:2157:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
			strncat(parent_path, "/tasks", sizeof(parent_path)
data/libcgroup-0.41/src/api.c:2158:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					- strlen(parent_path));
data/libcgroup-0.41/src/api.c:2234:2:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
	strncat(path, file, sizeof(path) - strlen(path));
data/libcgroup-0.41/src/api.c:2234:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	strncat(path, file, sizeof(path) - strlen(path));
data/libcgroup-0.41/src/api.c:2296:2:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
	strncat(path, d_name, sizeof(path) - strlen(path));
data/libcgroup-0.41/src/api.c:2296:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	strncat(path, d_name, sizeof(path) - strlen(path));
data/libcgroup-0.41/src/api.c:2317: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).
	tmp_len = strlen(path) - strlen("/tasks");
data/libcgroup-0.41/src/api.c:2317:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	tmp_len = strlen(path) - strlen("/tasks");
data/libcgroup-0.41/src/api.c:2403: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).
		path_len = strlen(path);
data/libcgroup-0.41/src/api.c:2404:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(path, cgroup->name, FILENAME_MAX - path_len - 1);
data/libcgroup-0.41/src/api.c:2513:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cgroup->name, dest, FILENAME_MAX);
data/libcgroup-0.41/src/api.c:2707: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(input);
data/libcgroup-0.41/src/api.c:2927: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).
		for(j = i = 0; i < strlen(tmp->destination) &&
data/libcgroup-0.41/src/api.c:3310:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strncmp(controller, token, strlen(controller) + 1)
data/libcgroup-0.41/src/api.c:3552:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cgroup_stat->name, token, FILENAME_MAX);
data/libcgroup-0.41/src/api.c:3559:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cgroup_stat->value, token, CG_VALUE_MAX);
data/libcgroup-0.41/src/api.c:3816:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(info->name, cg_mount_table[*pos].name, FILENAME_MAX);
data/libcgroup-0.41/src/api.c:3818:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(info->path, cg_mount_table[*pos].mount.path, FILENAME_MAX);
data/libcgroup-0.41/src/api.c:3876:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (sscanf((buf + strlen("Uid:") + 1), "%d%d%d%d",
data/libcgroup-0.41/src/api.c:3883:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (sscanf((buf + strlen("Gid:") + 1), "%d%d%d%d",
data/libcgroup-0.41/src/api.c:3928:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			len = strlen(buf);
data/libcgroup-0.41/src/api.c:3931:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			*procname_status = strdup(buf + strlen("Name:") + 1);
data/libcgroup-0.41/src/api.c:3978:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = fgetc(f);
data/libcgroup-0.41/src/api.c:4006: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(buf_cwd, "/");
data/libcgroup-0.41/src/api.c:4120:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    sizeof(addr.sun_family) + strlen(CGRULE_CGRED_SOCKET_PATH)) < 0) {
data/libcgroup-0.41/src/api.c:4132:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(sk, buff, sizeof(buff)) < 0)
data/libcgroup-0.41/src/api.c:4210:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(info->name, subsys_name, FILENAME_MAX);
data/libcgroup-0.41/src/api.c:4276:2:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
	strncat(cgroup_path, "/cgroup.procs", FILENAME_MAX-strlen(cgroup_path));
data/libcgroup-0.41/src/api.c:4276:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	strncat(cgroup_path, "/cgroup.procs", FILENAME_MAX-strlen(cgroup_path));
data/libcgroup-0.41/src/bindings/libcgroup.c:372: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).
  const char* te = tb + strlen(tb);
data/libcgroup-0.41/src/bindings/libcgroup.c:656: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(name) + 1 > (bsz - (r - buff))) return 0;
data/libcgroup-0.41/src/bindings/libcgroup.c:677: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).
  size_t lname = (name ? strlen(name) : 0);
data/libcgroup-0.41/src/bindings/libcgroup.c:682:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(r,name,lname+1);
data/libcgroup-0.41/src/bindings/libcgroup.c:850:91:  [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).
#  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
data/libcgroup-0.41/src/bindings/libcgroup.c:3181:48:  [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 SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
data/libcgroup-0.41/src/bindings/libcgroup.c:3251:30:  [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 (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
data/libcgroup-0.41/src/bindings/libcgroup.c:3593:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t size = strlen((const char *)((const char *)(arg2))) + 1;
data/libcgroup-0.41/src/bindings/libcgroup.c:3653:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t size = strlen((const char *)((const char *)(arg2))) + 1;
data/libcgroup-0.41/src/bindings/libcgroup.c:3713:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t size = strlen((const char *)((const char *)(arg2))) + 1;
data/libcgroup-0.41/src/bindings/libcgroup.c:8158:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      size_t size = strlen(name)+1;
data/libcgroup-0.41/src/bindings/libcgroup.c:8161:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(gv->name,name,size);
data/libcgroup-0.41/src/bindings/libcgroup.c:8223: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).
              strlen(const_table[j].name)) == 0) {
data/libcgroup-0.41/src/bindings/libcgroup.c:8234:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
data/libcgroup-0.41/src/bindings/libcgroup.c:8238:15:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
              strncpy(buff, methods[i].ml_doc, ldoc);
data/libcgroup-0.41/src/bindings/libcgroup.c:8240:15:  [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(buff, "swig_ptr: ", 10);
data/libcgroup-0.41/src/config.c:171:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(config_cgroup->name, cg_name, FILENAME_MAX);
data/libcgroup-0.41/src/config.c:566:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
			strncat(cname, ",", FILENAME_MAX - strlen(cname) - 1);
data/libcgroup-0.41/src/config.c:566:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			strncat(cname, ",", FILENAME_MAX - strlen(cname) - 1);
data/libcgroup-0.41/src/config.c:567:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
			strncat(cname, name,
data/libcgroup-0.41/src/config.c:568:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					FILENAME_MAX - strlen(cname) - 1);
data/libcgroup-0.41/src/config.c:650:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
		strncat(mount->name, ",", FILENAME_MAX - strlen(mount->name)-1);
data/libcgroup-0.41/src/config.c:650:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		strncat(mount->name, ",", FILENAME_MAX - strlen(mount->name)-1);
data/libcgroup-0.41/src/config.c:651:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
		strncat(mount->name, "none",
data/libcgroup-0.41/src/config.c:652:20:  [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).
				FILENAME_MAX - strlen(mount->name) - 1);
data/libcgroup-0.41/src/config.c:1633:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(buffer, t_cgroup->name,
data/libcgroup-0.41/src/config.c:1635:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(t_cgroup->name, cgroup->name,
data/libcgroup-0.41/src/config.c:1640:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(t_cgroup->name, buffer,
data/libcgroup-0.41/src/daemon/cgrulesengd.c:616:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(fd_client, &pid, sizeof(pid)) < 0) {
data/libcgroup-0.41/src/daemon/cgrulesengd.c:628:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(fd_client, &flags, sizeof(flags)) < 0) {
data/libcgroup-0.41/src/daemon/cgrulesengd.c:732:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    sizeof(saddr.sun_family) + strlen(CGRULE_CGRED_SOCKET_PATH)) < 0) {
data/libcgroup-0.41/src/daemon/cgrulesengd.c:1008:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(arg) > 1)
data/libcgroup-0.41/src/lex.c:623:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
data/libcgroup-0.41/src/lex.c:862:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
{yylval.name = strdup(yytext+1); yylval.name[strlen(yylval.name)-1] = '\0'; return ID; }
data/libcgroup-0.41/src/lex.c:1589:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return yy_scan_bytes(yystr,strlen(yystr) );
data/libcgroup-0.41/src/tools/cgget.c:85:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (line[strlen(line)-1] == '\n')
data/libcgroup-0.41/src/tools/cgget.c:98:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (line[strlen(line)-1] == '\n')
data/libcgroup-0.41/src/tools/cgset.c:142:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(name_value[nv_number].name, buf, FILENAME_MAX);
data/libcgroup-0.41/src/tools/cgset.c:154:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(name_value[nv_number].value, buf, CG_VALUE_MAX);
data/libcgroup-0.41/src/tools/cgset.c:166:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(src_cg_path, optarg, FILENAME_MAX);
data/libcgroup-0.41/src/tools/cgsnapshot.c:229:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(tasks_path, path, FILENAME_MAX);
data/libcgroup-0.41/src/tools/cgsnapshot.c:231:2:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
	strncat(tasks_path, "/tasks", FILENAME_MAX - strlen(tasks_path) - 1);
data/libcgroup-0.41/src/tools/cgsnapshot.c:231:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	strncat(tasks_path, "/tasks", FILENAME_MAX - strlen(tasks_path) - 1);
data/libcgroup-0.41/src/tools/cgsnapshot.c:359:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(var_path, group_path, root_path_len);
data/libcgroup-0.41/src/tools/cgsnapshot.c:361:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
			strncat(var_path, "/", FILENAME_MAX -
data/libcgroup-0.41/src/tools/cgsnapshot.c:362: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(var_path) - 1);
data/libcgroup-0.41/src/tools/cgsnapshot.c:364:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
			strncat(var_path, name, FILENAME_MAX -
data/libcgroup-0.41/src/tools/cgsnapshot.c:365: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(var_path) - 1);
data/libcgroup-0.41/src/tools/cgsnapshot.c:469: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).
	prefix_len = strlen(info.full_path);
data/libcgroup-0.41/src/tools/cgsnapshot.c:476:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(cgroup_name, &info.full_path[prefix_len],
data/libcgroup-0.41/src/tools/cgsnapshot.c:554:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(controllers[max],
data/libcgroup-0.41/src/tools/cgsnapshot.c:570:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(controllers[0], controller.name, FILENAME_MAX);
data/libcgroup-0.41/src/tools/cgsnapshot.c:573:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(path, controller.path, FILENAME_MAX);
data/libcgroup-0.41/src/tools/cgsnapshot.c:646:37:  [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(cont_names[i], name, strlen(name)+1)) {
data/libcgroup-0.41/src/tools/cgsnapshot.c:757:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(bl_file, optarg, FILENAME_MAX);
data/libcgroup-0.41/src/tools/cgsnapshot.c:762:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(wl_file, optarg, FILENAME_MAX);
data/libcgroup-0.41/src/tools/cgsnapshot.c:786:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(wanted_cont[c_number], argv[optind], FILENAME_MAX);
data/libcgroup-0.41/src/tools/lscgroup.c:34: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(path) - 1;
data/libcgroup-0.41/src/tools/lscgroup.c:99:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cgroup_dir_path, info.full_path, FILENAME_MAX);
data/libcgroup-0.41/src/tools/lscgroup.c:103:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(input_dir_path, input_path, FILENAME_MAX);
data/libcgroup-0.41/src/tools/lscgroup.c:107:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len  = strlen(cgroup_dir_path) - strlen(input_dir_path);
data/libcgroup-0.41/src/tools/lscgroup.c:107:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len  = strlen(cgroup_dir_path) - strlen(input_dir_path);
data/libcgroup-0.41/src/tools/lscgroup.c:145:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
			strncat(all_conts, ",",
data/libcgroup-0.41/src/tools/lscgroup.c:146: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).
				FILENAME_MAX-strlen(all_conts)-1);
data/libcgroup-0.41/src/tools/lscgroup.c:147:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
			strncat(all_conts, controller.name,
data/libcgroup-0.41/src/tools/lscgroup.c:148: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).
				FILENAME_MAX-strlen(all_conts)-1);
data/libcgroup-0.41/src/tools/lscgroup.c:165:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(all_conts, controller.name, FILENAME_MAX);
data/libcgroup-0.41/src/tools/lscgroup.c:167:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(con_name, controller.name, FILENAME_MAX);
data/libcgroup-0.41/src/tools/lscgroup.c:169:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(path, controller.path, FILENAME_MAX);
data/libcgroup-0.41/src/tools/lssubsys.c:120:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(cont_name, info.name, FILENAME_MAX-1);
data/libcgroup-0.41/src/tools/lssubsys.c:122:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(cont_names, info.name, FILENAME_MAX-1);
data/libcgroup-0.41/src/tools/lssubsys.c:273:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(cont_name[c_number], argv[optind], FILENAME_MAX);
data/libcgroup-0.41/src/tools/tools-common.c:92:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cdptr[i]->path, pathptr, FILENAME_MAX);
data/libcgroup-0.41/src/tools/tools-common.c:246: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(string);
data/libcgroup-0.41/src/wrapper.c:51:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cgroup->name, name, sizeof(cgroup->name));
data/libcgroup-0.41/src/wrapper.c:85:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(controller->name, name, sizeof(controller->name));
data/libcgroup-0.41/src/wrapper.c:148:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cntl_value->name, name, sizeof(cntl_value->name));
data/libcgroup-0.41/src/wrapper.c:149:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cntl_value->value, value, sizeof(cntl_value->value));
data/libcgroup-0.41/src/wrapper.c:359:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(val->value, value, CG_VALUE_MAX);
data/libcgroup-0.41/src/wrapper.c:556:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(con, name_value[i].name, FILENAME_MAX);
data/libcgroup-0.41/tests/libcg_ba.cpp:98:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cgroup_name, name.c_str(), name.length() + 1);
data/libcgroup-0.41/tests/libcgrouptest01.c:63:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(mountpoint, argv[4], sizeof(mountpoint));
data/libcgroup-0.41/tests/libcgrouptest01.c:67:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(mountpoint2, argv[5], sizeof(mountpoint2));
data/libcgroup-0.41/tests/libcgrouptest01.c:243: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(cval.val_string, "260000", sizeof(cval.val_string));
data/libcgroup-0.41/tests/libcgrouptest01.c:608: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(cval.val_string, "7000064", sizeof(cval.val_string));
data/libcgroup-0.41/tests/libcgrouptest01.c:683: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(cval.val_string, "260000", sizeof(cval.val_string));
data/libcgroup-0.41/tests/libcgrouptest01.c:705: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(cval.val_string, "7000064", sizeof(cval.val_string));
data/libcgroup-0.41/tests/libcgrouptest01.c:732: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(cval.val_string, "260000", sizeof(cval.val_string));
data/libcgroup-0.41/tests/libcgrouptest01.c:734:4:  [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(cval.val_string, "7000064",
data/libcgroup-0.41/tests/read_stats.c:65: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).
	root_len = strlen(info.full_path) - 1;
data/libcgroup-0.41/tests/read_stats.c:66:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cgroup_path, info.path, FILENAME_MAX);
data/libcgroup-0.41/tests/read_stats.c:75:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(cgroup_path, info.full_path + root_len, FILENAME_MAX);
data/libcgroup-0.41/tests/read_stats.c:76:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(cgroup_path, "/");
data/libcgroup-0.41/tests/setuid.c:75: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(3000000);
data/libcgroup-0.41/tests/test_functions.c:142:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(group, grpname, sizeof(group));
data/libcgroup-0.41/tests/test_functions.c:153: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(cval.val_string, "260000", sizeof(cval.val_string));
data/libcgroup-0.41/tests/test_functions.c:157: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(cval.val_string, "7000064", sizeof(cval.val_string));
data/libcgroup-0.41/tests/test_functions.c:379: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(controller_name, "memory", FILENAME_MAX);
data/libcgroup-0.41/tests/test_functions.c:380: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(control_file, "memory.limit_in_bytes", FILENAME_MAX);
data/libcgroup-0.41/tests/test_functions.c:388: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(controller_name, "cpu", FILENAME_MAX);
data/libcgroup-0.41/tests/test_functions.c:389: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(control_file, "cpu.shares", FILENAME_MAX);
data/libcgroup-0.41/tests/test_functions.c:394: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(controller_name, "cpuset", FILENAME_MAX);
data/libcgroup-0.41/tests/test_functions.c:395: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(control_file, "cpuset.cpus", FILENAME_MAX);
data/libcgroup-0.41/tests/test_functions.c:453:45:  [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(string_val, cval.val_string, strlen(string_val)))
data/libcgroup-0.41/tests/test_functions.c:600:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (!strncmp(entry->mnt_type, "cgroup", strlen("cgroup"))) {
data/libcgroup-0.41/tests/test_functions.c:672: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(res, "PASS :", 10);
data/libcgroup-0.41/tests/test_functions.c:674: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(res, "FAIL :", 10);
data/libcgroup-0.41/tests/test_functions.c:694:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(target, mountpoint, FILENAME_MAX);
data/libcgroup-0.41/tests/test_functions.c:697:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
		strncat(target, "/", FILENAME_MAX - strlen(target));
data/libcgroup-0.41/tests/test_functions.c:697:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		strncat(target, "/", FILENAME_MAX - strlen(target));
data/libcgroup-0.41/tests/test_functions.c:698:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(target, group, FILENAME_MAX - strlen(target));
data/libcgroup-0.41/tests/test_functions.c:698: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).
		strncat(target, group, FILENAME_MAX - strlen(target));
data/libcgroup-0.41/tests/test_functions.c:702:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
		strncat(target, "/", FILENAME_MAX - strlen(target));
data/libcgroup-0.41/tests/test_functions.c:702:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		strncat(target, "/", FILENAME_MAX - strlen(target));
data/libcgroup-0.41/tests/test_functions.c:703:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(target, file, FILENAME_MAX - strlen(target));
data/libcgroup-0.41/tests/test_functions.c:703:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		strncat(target, file, FILENAME_MAX - strlen(target));
data/libcgroup-0.41/tests/walk_test.c:13:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				+ strlen(root) - 1,

ANALYSIS SUMMARY:

Hits = 440
Lines analyzed = 28259 in approximately 0.85 seconds (33085 lines/second)
Physical Source Lines of Code (SLOC) = 20223
Hits@level = [0] 462 [1] 176 [2] 195 [3]  16 [4]  45 [5]   8
Hits@level+ = [0+] 902 [1+] 440 [2+] 264 [3+]  69 [4+]  53 [5+]   8
Hits/KSLOC@level+ = [0+] 44.6027 [1+] 21.7574 [2+] 13.0544 [3+] 3.41196 [4+] 2.62078 [5+] 0.395589
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.