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/apparmor-3.0.0/changehat/tomcat_apparmor/tomcat_5_5/src/jni_src/JNIChangeHat.c
Examining data/apparmor-3.0.0/changehat/tomcat_apparmor/tomcat_5_0/src/jni_src/JNIChangeHat.c
Examining data/apparmor-3.0.0/changehat/pam_apparmor/pam_apparmor.h
Examining data/apparmor-3.0.0/changehat/pam_apparmor/pam_apparmor.c
Examining data/apparmor-3.0.0/changehat/pam_apparmor/get_options.c
Examining data/apparmor-3.0.0/changehat/mod_apparmor/mod_apparmor.c
Examining data/apparmor-3.0.0/binutils/aa_features_abi.c
Examining data/apparmor-3.0.0/binutils/cJSON.h
Examining data/apparmor-3.0.0/binutils/aa_exec.c
Examining data/apparmor-3.0.0/binutils/cJSON.c
Examining data/apparmor-3.0.0/binutils/aa_status.c
Examining data/apparmor-3.0.0/binutils/aa_enabled.c
Examining data/apparmor-3.0.0/parser/parser_include.h
Examining data/apparmor-3.0.0/parser/signal.h
Examining data/apparmor-3.0.0/parser/rule.cc
Examining data/apparmor-3.0.0/parser/network.h
Examining data/apparmor-3.0.0/parser/default_features.c
Examining data/apparmor-3.0.0/parser/dbus.cc
Examining data/apparmor-3.0.0/parser/parser.h
Examining data/apparmor-3.0.0/parser/immunix.h
Examining data/apparmor-3.0.0/parser/signal.cc
Examining data/apparmor-3.0.0/parser/ptrace.cc
Examining data/apparmor-3.0.0/parser/dbus.h
Examining data/apparmor-3.0.0/parser/unit_test.h
Examining data/apparmor-3.0.0/parser/policydb.h
Examining data/apparmor-3.0.0/parser/mount.cc
Examining data/apparmor-3.0.0/parser/libapparmor_re/chfa.cc
Examining data/apparmor-3.0.0/parser/libapparmor_re/expr-tree.h
Examining data/apparmor-3.0.0/parser/libapparmor_re/flex-tables.h
Examining data/apparmor-3.0.0/parser/libapparmor_re/apparmor_re.h
Examining data/apparmor-3.0.0/parser/libapparmor_re/parse.h
Examining data/apparmor-3.0.0/parser/libapparmor_re/hfa.h
Examining data/apparmor-3.0.0/parser/libapparmor_re/chfa.h
Examining data/apparmor-3.0.0/parser/libapparmor_re/expr-tree.cc
Examining data/apparmor-3.0.0/parser/libapparmor_re/aare_rules.cc
Examining data/apparmor-3.0.0/parser/libapparmor_re/hfa.cc
Examining data/apparmor-3.0.0/parser/libapparmor_re/aare_rules.h
Examining data/apparmor-3.0.0/parser/parser_alias.c
Examining data/apparmor-3.0.0/parser/common_optarg.c
Examining data/apparmor-3.0.0/parser/parser_include.c
Examining data/apparmor-3.0.0/parser/af_unix.cc
Examining data/apparmor-3.0.0/parser/profile.cc
Examining data/apparmor-3.0.0/parser/parser_misc.c
Examining data/apparmor-3.0.0/parser/mount.h
Examining data/apparmor-3.0.0/parser/parser_interface.c
Examining data/apparmor-3.0.0/parser/lib.h
Examining data/apparmor-3.0.0/parser/parser_policy.c
Examining data/apparmor-3.0.0/parser/parser_variable.c
Examining data/apparmor-3.0.0/parser/policy_cache.h
Examining data/apparmor-3.0.0/parser/ptrace.h
Examining data/apparmor-3.0.0/parser/lib.c
Examining data/apparmor-3.0.0/parser/parser_common.c
Examining data/apparmor-3.0.0/parser/af_rule.h
Examining data/apparmor-3.0.0/parser/network.c
Examining data/apparmor-3.0.0/parser/common_optarg.h
Examining data/apparmor-3.0.0/parser/profile.h
Examining data/apparmor-3.0.0/parser/parser_symtab.c
Examining data/apparmor-3.0.0/parser/rule.h
Examining data/apparmor-3.0.0/parser/parser_merge.c
Examining data/apparmor-3.0.0/parser/policy_cache.c
Examining data/apparmor-3.0.0/parser/af_rule.cc
Examining data/apparmor-3.0.0/parser/af_unix.h
Examining data/apparmor-3.0.0/parser/parser_regex.c
Examining data/apparmor-3.0.0/parser/base_cap_names.h
Examining data/apparmor-3.0.0/parser/capability.h
Examining data/apparmor-3.0.0/parser/parser_main.c
Examining data/apparmor-3.0.0/tests/stress/apparmor/change_hat.c
Examining data/apparmor-3.0.0/tests/stress/apparmor/open.c
Examining data/apparmor-3.0.0/tests/stress/apparmor/child.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/pwrite.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/syscall_mknod.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/unix_socket_common.h
Examining data/apparmor-3.0.0/tests/regression/apparmor/tcp.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/TODO/clone.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/TODO/exec_i.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/TODO/zombie.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/TODO/exec_u.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/TODO/kill.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/TODO/syscall_others.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/env_check.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/readdir.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/unlink.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/changehat.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/changehat_wrapper.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/mmap.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/transition.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/unix_fd_server.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/swap.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/chmod.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/clone.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/syscall_sysctl.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/link_subset.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/syscall_reboot.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/chown.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/dbus_unrequested_reply.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/changehat_fork.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/dbus_common.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/xattrs.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/changeprofile.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/syscall_mlockall.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/changehat_misc.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/fchdir.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/changehat.h
Examining data/apparmor-3.0.0/tests/regression/apparmor/exec.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/unix_socket_client.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/ptrace.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/syscall_query_module.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/deleted.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/pipe.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/at_secure.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/unix_socket.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/changehat_fail.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/openat.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/dbus_service.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/pivot_root.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/chdir.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/socketpair.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/mount.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/dbus_eavesdrop.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/access.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/unix_fd_client.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/fd_inheritor.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/syscall_setdomainname.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/net_raw.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/syscall_chroot.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/symlink.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/link.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/syscall_setscheduler.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/dropprivs_wrapper.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/syscall_ioperm.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/query_label.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/xattrs_profile.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/changehat_pthread.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/introspect.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/named_pipe.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/netdomain/test_multi_receive.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/netdomain/test_multi_send.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/coredump.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/syscall_iopl.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/open.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/exec_qual.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/exec_qual2.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/syscall_ptrace.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/aa_policy_cache.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/ptrace_helper.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/mkdir.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/changehat_misc2.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/syscall_setpriority.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/fchown.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/dbus_common.h
Examining data/apparmor-3.0.0/tests/regression/apparmor/fd_inheritance.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/changehat_twice.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/dbus_message.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/chgrp.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/rename.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/syscall_sethostname.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/sysctl_proc.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/rw.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/environ.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/fchgrp.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/fchmod.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/fork.c
Examining data/apparmor-3.0.0/tests/regression/apparmor/unix_socket_common.c
Examining data/apparmor-3.0.0/libraries/libapparmor/include/sys/apparmor.h
Examining data/apparmor-3.0.0/libraries/libapparmor/include/sys/apparmor_private.h
Examining data/apparmor-3.0.0/libraries/libapparmor/include/aalogparse.h
Examining data/apparmor-3.0.0/libraries/libapparmor/testsuite/test_multi.c
Examining data/apparmor-3.0.0/libraries/libapparmor/src/libaalogparse.c
Examining data/apparmor-3.0.0/libraries/libapparmor/src/parser.h
Examining data/apparmor-3.0.0/libraries/libapparmor/src/PMurHash.c
Examining data/apparmor-3.0.0/libraries/libapparmor/src/kernel_interface.c
Examining data/apparmor-3.0.0/libraries/libapparmor/src/private.c
Examining data/apparmor-3.0.0/libraries/libapparmor/src/features.c
Examining data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c
Examining data/apparmor-3.0.0/libraries/libapparmor/src/tst_aalogmisc.c
Examining data/apparmor-3.0.0/libraries/libapparmor/src/tst_kernel.c
Examining data/apparmor-3.0.0/libraries/libapparmor/src/private.h
Examining data/apparmor-3.0.0/libraries/libapparmor/src/PMurHash.h
Examining data/apparmor-3.0.0/libraries/libapparmor/src/policy_cache.c
Examining data/apparmor-3.0.0/libraries/libapparmor/src/tst_features.c

FINAL RESULTS:

data/apparmor-3.0.0/binutils/aa_status.c:275:10:  [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.
			res = readlink(exe, real_exe, PATH_MAX);
data/apparmor-3.0.0/tests/regression/apparmor/chgrp.c:34: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(argv[1], -1, gid) == -1) {
data/apparmor-3.0.0/tests/regression/apparmor/chmod.c:33: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(argv[1], mode) == -1) {
data/apparmor-3.0.0/tests/regression/apparmor/chown.c:33: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(argv[1], uid, -1) == -1) {
data/apparmor-3.0.0/binutils/aa_exec.c:71: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(stderr, fmt, args);
data/apparmor-3.0.0/binutils/aa_exec.c:85: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(stderr, fmt, args);
data/apparmor-3.0.0/binutils/aa_exec.c:98: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(stderr, fmt, args);
data/apparmor-3.0.0/binutils/aa_exec.c:179:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(name, namespace);
data/apparmor-3.0.0/binutils/aa_exec.c:184:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(name, profile);
data/apparmor-3.0.0/binutils/aa_exec.c:230:2:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	execvp(argv[0], argv);
data/apparmor-3.0.0/binutils/aa_features_abi.c:79: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(stderr, fmt, args);
data/apparmor-3.0.0/binutils/aa_features_abi.c:94: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(stderr, fmt, args);
data/apparmor-3.0.0/binutils/aa_features_abi.c:107: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(stderr, fmt, args);
data/apparmor-3.0.0/binutils/aa_status.c:79:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		printf(__VA_ARGS__);					       \
data/apparmor-3.0.0/binutils/aa_status.c:85:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(__VA_ARGS__);					       \
data/apparmor-3.0.0/binutils/aa_status.c:121:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(apparmor_profiles, "%s/profiles", apparmorfs);
data/apparmor-3.0.0/binutils/cJSON.c:406:9:  [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(object->valuestring, valuestring);
data/apparmor-3.0.0/libraries/libapparmor/src/features.c:84:6:  [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.
	i = vsnprintf(fst->pos, remaining, fmt, args);
data/apparmor-3.0.0/libraries/libapparmor/src/features.c:246:6:  [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.
	if (snprintf(features->hash, HASH_SIZE,
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:653:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf, "%s %016lx^", cmd, token);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:657: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(pos, *hats);
data/apparmor-3.0.0/libraries/libapparmor/src/private.c:113: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(stderr, fmt, args);
data/apparmor-3.0.0/parser/immunix.h:154:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr, "parser: " fmt, ## args);	\
data/apparmor-3.0.0/parser/parser.h:201:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr, "parser: " fmt, ## args);	\
data/apparmor-3.0.0/parser/parser.h:212:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr, fmt, ## args);		\
data/apparmor-3.0.0/parser/parser_alias.c:104:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(n, "%s%s", alias->to, target + strlen(alias->from));
data/apparmor-3.0.0/parser/parser_common.c:122:9:  [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(stderr, newfmt, arg);
data/apparmor-3.0.0/parser/parser_interface.c:407:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(name, "%s//%s", profile->parent->name, profile->name);
data/apparmor-3.0.0/parser/parser_main.c:1016: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(target, R_OK) == 0)
data/apparmor-3.0.0/parser/parser_misc.c:48:30:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define PDEBUG(fmt, args...) fprintf(stderr, "Lexer: " fmt, ## args)
data/apparmor-3.0.0/parser/parser_misc.c:917:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(stderr, err, label);
data/apparmor-3.0.0/parser/parser_policy.c:39:30:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define PDEBUG(fmt, args...) fprintf(stderr, "Lexer: " fmt, ## args)
data/apparmor-3.0.0/parser/parser_policy.c:119:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(name, "%s//%s", prof->name, entry->nt_name);
data/apparmor-3.0.0/parser/unit_test.h:41: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.
        vsnprintf(buf, sizeof(buf), msg, arg);
data/apparmor-3.0.0/tests/regression/apparmor/access.c:47:5:  [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.
	rc=access(path, mode);
data/apparmor-3.0.0/tests/regression/apparmor/changehat_wrapper.c:109:5:  [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(manual_string, optarg);
data/apparmor-3.0.0/tests/regression/apparmor/changehat_wrapper.c:157:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf (pname, "%s", argv[optind]);
data/apparmor-3.0.0/tests/regression/apparmor/changehat_wrapper.c:177:8:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		exit(execv(pname, &argv[optind]));
data/apparmor-3.0.0/tests/regression/apparmor/dropprivs_wrapper.c:65:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (pname, "./%s", argv[1]);
data/apparmor-3.0.0/tests/regression/apparmor/dropprivs_wrapper.c:67:7:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	exit(execv(pname, &argv[1]));
data/apparmor-3.0.0/tests/regression/apparmor/environ.c:72:12:  [4] (shell) execl:
  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.
		retval = execl(argv[1], argv[1], argv[2], (char *) NULL);
data/apparmor-3.0.0/tests/regression/apparmor/fd_inheritance.c:55:2:  [4] (shell) execl:
  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.
	execl(argv[2], argv[2], fd_str, buf, NULL);
data/apparmor-3.0.0/tests/regression/apparmor/link_subset.c:156:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buffer, "%s%s", name, perms);
data/apparmor-3.0.0/tests/regression/apparmor/link_subset.c:219:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(lname, "%s%s:%s", argv[2], perms, perms);
data/apparmor-3.0.0/tests/regression/apparmor/link_subset.c:220: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(b, lname);
data/apparmor-3.0.0/tests/regression/apparmor/ptrace.c:232:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
				  fprintf(stderr, usage, argv[0]);
data/apparmor-3.0.0/tests/regression/apparmor/ptrace.c:238:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(stderr, usage, argv[0]);
data/apparmor-3.0.0/tests/regression/apparmor/query_label.c:240: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(to, label);
data/apparmor-3.0.0/tests/regression/apparmor/readdir.c:39: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(format, arg);
data/apparmor-3.0.0/tests/regression/apparmor/socketpair.c:140:2:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	execv(argv[0], argv);
data/apparmor-3.0.0/tests/regression/apparmor/transition.c:298:2:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	execv(prog, argv);
data/apparmor-3.0.0/tests/regression/apparmor/unix_fd_client.c:41:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(remote.sun_path, argv[1]);
data/apparmor-3.0.0/tests/regression/apparmor/unix_fd_server.c:76: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(local.sun_path, argv[2]);
data/apparmor-3.0.0/tests/regression/apparmor/unix_fd_server.c:95:3:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execlp(argv[3], argv[3], argv[2], NULL);
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket.c:239:3:  [4] (shell) execl:
  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.
		execl(argv[4], argv[4], sun_path, argv[2], fd_number, NULL);
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket_client.c:97: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(addr.sun_path + peer_path_len, SUN_PATH_SUFFIX);
data/apparmor-3.0.0/binutils/aa_exec.c:125:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt_long(argc, argv, "+dhp:n:iv", long_opts, NULL)) != -1) {
data/apparmor-3.0.0/binutils/aa_features_abi.c:127:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt_long(argc, argv, "+dvhxl:w:", long_opts, NULL)) != -1) {
data/apparmor-3.0.0/binutils/aa_status.c:265:14:  [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.
		real_exe = realpath(exe, NULL);
data/apparmor-3.0.0/parser/parser_main.c:764: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, short_options, long_options, &o)) != -1)
data/apparmor-3.0.0/parser/parser_main.c:781: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, short_options, long_options, &o)) != -1)
data/apparmor-3.0.0/tests/regression/apparmor/changehat_wrapper.c:95: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, "+", long_options, &o)) != -1) {
data/apparmor-3.0.0/tests/regression/apparmor/clone.c:68: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, "+hn", long_options, NULL)) != -1) {
data/apparmor-3.0.0/tests/regression/apparmor/env_check.c:28:11:  [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.
	envval = getenv(var);
data/apparmor-3.0.0/tests/regression/apparmor/openat.c:43: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, "+hdr:", long_options, NULL)) != -1) {
data/apparmor-3.0.0/tests/regression/apparmor/ptrace.c:220:9:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		opt = getopt(argc, argv, "chn:");
data/apparmor-3.0.0/tests/regression/apparmor/ptrace_helper.c:14: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.
char *tracer = getenv("_tracer");
data/apparmor-3.0.0/tests/regression/apparmor/socketpair.c:37:8:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	fd0 = getenv(ENV_FD0);
data/apparmor-3.0.0/tests/regression/apparmor/socketpair.c:38:8:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	fd1 = getenv(ENV_FD1);
data/apparmor-3.0.0/tests/regression/apparmor/syscall_chroot.c:93:6:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
	if (chroot(argv[1]) == -1) {
data/apparmor-3.0.0/tests/regression/apparmor/transition.c:358:14:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((o = getopt(argc, argv, "f:L:M:l:m:nO:P:o:p:i:")) != -1) {
data/apparmor-3.0.0/binutils/aa_exec.c:180:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(name, "://");
data/apparmor-3.0.0/binutils/aa_exec.c:189:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[PATH_MAX];
data/apparmor-3.0.0/binutils/aa_features_abi.c:184:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		int in = open(opt_file, O_RDONLY);
data/apparmor-3.0.0/binutils/aa_features_abi.c:194:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		out = open(opt_write, O_WRONLY | O_CREAT, 00600);
data/apparmor-3.0.0/binutils/aa_status.c:123: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(apparmor_profiles, "r");
data/apparmor-3.0.0/binutils/aa_status.c:245:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		rc = aa_getprocattr(atoi(entry->d_name), "current", &profile, &mode);
data/apparmor-3.0.0/binutils/cJSON.c:122:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 version[15];
data/apparmor-3.0.0/binutils/cJSON.c:123:5:  [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(version, "%i.%i.%i", CJSON_VERSION_MAJOR, CJSON_VERSION_MINOR, CJSON_VERSION_PATCH);
data/apparmor-3.0.0/binutils/cJSON.c:200: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(copy, string, length);
data/apparmor-3.0.0/binutils/cJSON.c:305:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char number_c_string[64];
data/apparmor-3.0.0/binutils/cJSON.c:512: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.
            memcpy(newbuffer, p->buffer, p->offset + 1);
data/apparmor-3.0.0/binutils/cJSON.c:549:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char number_buffer[26] = {0}; /* temporary buffer to print the number into */
data/apparmor-3.0.0/binutils/cJSON.c:561:18:  [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.
        length = sprintf((char*)number_buffer, "null");
data/apparmor-3.0.0/binutils/cJSON.c:566:18:  [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.
        length = sprintf((char*)number_buffer, "%1.15g", d);
data/apparmor-3.0.0/binutils/cJSON.c:572:22:  [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.
            length = sprintf((char*)number_buffer, "%1.17g", d);
data/apparmor-3.0.0/binutils/cJSON.c:918:9:  [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((char*)output, "\"\"");
data/apparmor-3.0.0/binutils/cJSON.c:959:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(output + 1, input, output_length);
data/apparmor-3.0.0/binutils/cJSON.c:1005:21:  [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((char*)output_pointer, "u%04x", *input_pointer);
data/apparmor-3.0.0/binutils/cJSON.c:1222:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(printed, buffer->buffer, cjson_min(buffer->length, buffer->offset + 1));
data/apparmor-3.0.0/binutils/cJSON.c:1378:13:  [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((char*)output, "null");
data/apparmor-3.0.0/binutils/cJSON.c:1387:13:  [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((char*)output, "false");
data/apparmor-3.0.0/binutils/cJSON.c:1396:13:  [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((char*)output, "true");
data/apparmor-3.0.0/binutils/cJSON.c:1416: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.
            memcpy(output, item->valuestring, raw_length);
data/apparmor-3.0.0/binutils/cJSON.c:1935: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(reference, item, sizeof(cJSON));
data/apparmor-3.0.0/changehat/mod_apparmor/mod_apparmor.c:142:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char *aa_hat_array[6] = { NULL, NULL, NULL, NULL, NULL, NULL };
data/apparmor-3.0.0/changehat/pam_apparmor/pam_apparmor.c:104:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open("/dev/urandom", O_RDONLY);
data/apparmor-3.0.0/changehat/tomcat_apparmor/tomcat_5_0/src/jni_src/JNIChangeHat.c:36:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char hatname[128];
data/apparmor-3.0.0/changehat/tomcat_apparmor/tomcat_5_5/src/jni_src/JNIChangeHat.c:36:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     char hatname[128];
data/apparmor-3.0.0/libraries/libapparmor/src/features.c:44:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char hash[HASH_SIZE];
data/apparmor-3.0.0/libraries/libapparmor/src/features.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 string[STRING_SIZE];
data/apparmor-3.0.0/libraries/libapparmor/src/features.c:500:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(f->string, string, size);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:101:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open("/sys/module/apparmor/parameters/" PARAM, O_RDONLY);	\
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:105: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 buffer[2];						\
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:240:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		autoclose int fd = open(tmp, O_RDONLY);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:378:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(tmp, O_RDONLY);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:501:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(ctl, O_WRONLY);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:692: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.
	const char *argv[nhats+1];
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:940:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[QUERY_LABEL_REPLY_LEN];
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:958:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(aafs_access, O_RDWR);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:965:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(query, AA_QUERY_CMD_LABEL, AA_QUERY_CMD_LABEL_SIZE);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:1039:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(query + AA_QUERY_CMD_LABEL_SIZE, label, label_len);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:1043:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(query + AA_QUERY_CMD_LABEL_SIZE + label_len + 2, path, path_len);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:1098:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(query + pos, label, label_len);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:1103:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(query + pos + 1, link, link_len);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:1116:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(query + pos + 1, target, target_len);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel_interface.c:248:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	ki->dirfd = open(apparmorfs, O_RDONLY | O_CLOEXEC | O_DIRECTORY);
data/apparmor-3.0.0/libraries/libapparmor/src/libaalogparse.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 buf[3], *endptr;
data/apparmor-3.0.0/libraries/libapparmor/src/libaalogparse.c:145:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buf, "%.2s", hexstring);
data/apparmor-3.0.0/libraries/libapparmor/src/policy_cache.c:113:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	proc_fd = open(proc_path, O_RDONLY | O_CLOEXEC | O_PATH | O_NOFOLLOW);
data/apparmor-3.0.0/libraries/libapparmor/src/policy_cache.c:330:1:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
open:
data/apparmor-3.0.0/libraries/libapparmor/src/policy_cache.c:352:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
				goto open;
data/apparmor-3.0.0/libraries/libapparmor/src/private.c:363: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(dents[i], dent, sizeof(*dent));
data/apparmor-3.0.0/libraries/libapparmor/testsuite/test_multi.c:15:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char log_line[1024];
data/apparmor-3.0.0/libraries/libapparmor/testsuite/test_multi.c:29:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	testcase = fopen(argv[1], "r");
data/apparmor-3.0.0/parser/dbus.cc:206: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.
	const char *vec[6];
data/apparmor-3.0.0/parser/lib.c:411: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 str[2] = " ";
data/apparmor-3.0.0/parser/libapparmor_re/chfa.cc:323: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.
	const char zeroes[8] = { };
data/apparmor-3.0.0/parser/mount.cc:552:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(p, "(\\xfe|)");
data/apparmor-3.0.0/parser/mount.cc:591:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char flagsbuf[PATH_MAX + 3];
data/apparmor-3.0.0/parser/mount.cc:593:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char class_mount_hdr[64];
data/apparmor-3.0.0/parser/mount.cc:594: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.
	const char *vec[5];
data/apparmor-3.0.0/parser/mount.cc:603: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(class_mount_hdr, "\\x%02x", AA_CLASS_MOUNT);
data/apparmor-3.0.0/parser/network.c:156:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[32];
data/apparmor-3.0.0/parser/network.c:168:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(PROC_VERSION, O_RDONLY);
data/apparmor-3.0.0/parser/parser_include.c:60:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char *path[MAX_PATH] = { NULL };
data/apparmor-3.0.0/parser/parser_include.c:164: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).
		newf = fopen(buf, "r");
data/apparmor-3.0.0/parser/parser_interface.c:263:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char zeros[64];
data/apparmor-3.0.0/parser/parser_main.c:106:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *cacheloc[MAX_CACHE_LOCS];
data/apparmor-3.0.0/parser/parser_main.c:291: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(tmp, s, p - s);
data/apparmor-3.0.0/parser/parser_main.c:310:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(tmp, s, p - s);
data/apparmor-3.0.0/parser/parser_main.c:324: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 line[256];
data/apparmor-3.0.0/parser/parser_main.c:536:11:  [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).
		ofile = fopen(optarg, "w");
data/apparmor-3.0.0/parser/parser_main.c:803: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(name, "r");
data/apparmor-3.0.0/parser/parser_main.c:843:24:  [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).
	autofclose FILE *ms = fopen(MATCH_FILE, "r");
data/apparmor-3.0.0/parser/parser_main.c:1037: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).
		if ( !(yyin = fopen(profilename, "r")) ) {
data/apparmor-3.0.0/parser/parser_misc.c:216:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(cap_table, base_capability_table, sizeof(base_capability_table));
data/apparmor-3.0.0/parser/parser_regex.c:641: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.
		const char *vec[2];
data/apparmor-3.0.0/parser/parser_regex.c:659: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.
		const char *vec[3];
data/apparmor-3.0.0/parser/policy_cache.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 buffer[HEADER_STRING_SIZE + VERSION_STRING_SIZE];
data/apparmor-3.0.0/parser/policy_cache.c:43:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!(f = fopen(cachename, "r"))) {
data/apparmor-3.0.0/parser/policy_cache.c:151:19:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
		if ((cache_fd = mkstemp(tmpname)) < 0) {
data/apparmor-3.0.0/parser/profile.h:200:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *exec_table[AA_EXEC_COUNT];
data/apparmor-3.0.0/parser/signal.cc:78:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *const sig_names[MAXMAPPED_SIG + 1] = {
data/apparmor-3.0.0/parser/unit_test.h:38: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.
        char buf[PATH_MAX];
data/apparmor-3.0.0/tests/regression/apparmor/aa_policy_cache.c:86:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	proc_fd = open(proc_path, O_RDONLY | O_CLOEXEC | O_PATH | O_NOFOLLOW);
data/apparmor-3.0.0/tests/regression/apparmor/changehat.h:10:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[128];
data/apparmor-3.0.0/tests/regression/apparmor/changehat.h:13:5:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd=open(file, O_RDWR, 0);
data/apparmor-3.0.0/tests/regression/apparmor/changehat_wrapper.c:56:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(ATTR_FILE, O_WRONLY);
data/apparmor-3.0.0/tests/regression/apparmor/changehat_wrapper.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 buf[BUFSIZ];
data/apparmor-3.0.0/tests/regression/apparmor/clone.c:63:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[BUFSIZ];
data/apparmor-3.0.0/tests/regression/apparmor/dbus_message.c:144:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char sig[5];
data/apparmor-3.0.0/tests/regression/apparmor/dbus_message.c:165:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char sig[2];
data/apparmor-3.0.0/tests/regression/apparmor/dbus_message.c:249:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			log_fd = open(path, O_CREAT | O_TRUNC | O_WRONLY,
data/apparmor-3.0.0/tests/regression/apparmor/dbus_service.c:241:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			log_fd = open(path, O_CREAT | O_TRUNC | O_WRONLY,
data/apparmor-3.0.0/tests/regression/apparmor/dbus_service.c:253:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			lock_fd = atoi(fd);
data/apparmor-3.0.0/tests/regression/apparmor/dbus_unrequested_reply.c:173:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			log_fd = open(path, O_CREAT | O_TRUNC | O_WRONLY,
data/apparmor-3.0.0/tests/regression/apparmor/deleted.c:36:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[128];
data/apparmor-3.0.0/tests/regression/apparmor/deleted.c:48:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(argv[2], O_RDWR, 0);
data/apparmor-3.0.0/tests/regression/apparmor/deleted.c:117:5:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd=open(argv[2], O_RDWR, 0);
data/apparmor-3.0.0/tests/regression/apparmor/exec_qual2.c:45:5:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd=open(argv[1], O_RDWR, 0);
data/apparmor-3.0.0/tests/regression/apparmor/fchdir.c:29:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        dirfd = open(dir, O_RDONLY | O_DIRECTORY);
data/apparmor-3.0.0/tests/regression/apparmor/fchgrp.c:35:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(argv[1], O_RDONLY);
data/apparmor-3.0.0/tests/regression/apparmor/fchmod.c:32:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(argv[1], O_RDONLY);
data/apparmor-3.0.0/tests/regression/apparmor/fchown.c:34:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(argv[1], O_RDONLY);
data/apparmor-3.0.0/tests/regression/apparmor/fd_inheritance.c:32:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[BUF_LEN + 1], fd_str[FD_STR_LEN + 1];
data/apparmor-3.0.0/tests/regression/apparmor/fd_inheritance.c:40:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(argv[1], O_RDONLY);
data/apparmor-3.0.0/tests/regression/apparmor/fd_inheritor.c:29:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[BUF_LEN + 1];
data/apparmor-3.0.0/tests/regression/apparmor/fd_inheritor.c:37:7:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	fd = atoi(argv[1]);
data/apparmor-3.0.0/tests/regression/apparmor/fork.c:35:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(files[i], O_RDWR);
data/apparmor-3.0.0/tests/regression/apparmor/link_subset.c:154:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char perms[10];
data/apparmor-3.0.0/tests/regression/apparmor/link_subset.c:204: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 perms[10];
data/apparmor-3.0.0/tests/regression/apparmor/mmap.c:33: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 buf[128];
data/apparmor-3.0.0/tests/regression/apparmor/mmap.c:54:5:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd=open(argv[1], O_CREAT|O_EXCL|O_RDWR, S_IWUSR|S_IRUSR);
data/apparmor-3.0.0/tests/regression/apparmor/mmap.c:79:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	(void)memcpy(mptr, data, strlen(data));
data/apparmor-3.0.0/tests/regression/apparmor/named_pipe.c:27:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[128];
data/apparmor-3.0.0/tests/regression/apparmor/named_pipe.c:83:5:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd=open(file, O_RDONLY, 0);
data/apparmor-3.0.0/tests/regression/apparmor/named_pipe.c:109:5:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd=open(file, O_WRONLY, 0);
data/apparmor-3.0.0/tests/regression/apparmor/net_raw.c:34: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 data[BUFSIZE];
data/apparmor-3.0.0/tests/regression/apparmor/netdomain/test_multi_receive.c:70:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	local.sin_port = htons(atoi(bind_port));
data/apparmor-3.0.0/tests/regression/apparmor/netdomain/test_multi_receive.c:134:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	local.sin_port = htons(atoi(bind_port));
data/apparmor-3.0.0/tests/regression/apparmor/netdomain/test_multi_send.c:60:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	remote.sin_port = htons(atoi(remote_port));
data/apparmor-3.0.0/tests/regression/apparmor/netdomain/test_multi_send.c:64:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	local.sin_port = htons(atoi(bind_port));
data/apparmor-3.0.0/tests/regression/apparmor/netdomain/test_multi_send.c:96:33:  [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).
        remote.sin_port = htons(atoi(remote_port));
data/apparmor-3.0.0/tests/regression/apparmor/netdomain/test_multi_send.c:100:32:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        local.sin_port = htons(atoi(bind_port));
data/apparmor-3.0.0/tests/regression/apparmor/open.c:28:5:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd=open(argv[1], O_RDWR | O_CREAT, S_IWUSR | S_IRUSR);
data/apparmor-3.0.0/tests/regression/apparmor/openat.c:66:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	dirfd = open(dir, O_RDONLY | O_DIRECTORY);
data/apparmor-3.0.0/tests/regression/apparmor/pipe.c:27:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[128];
data/apparmor-3.0.0/tests/regression/apparmor/ptrace.c:229:28:  [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).
			case 'n': num_syscall = atoi(optarg); 
data/apparmor-3.0.0/tests/regression/apparmor/pwrite.c:32:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char in_buffer[strlen(bugger) +1];
data/apparmor-3.0.0/tests/regression/apparmor/pwrite.c:51:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(argv[1], O_CREAT|O_RDWR, S_IWUSR|S_IRUSR);
data/apparmor-3.0.0/tests/regression/apparmor/readdir.c:52:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(dirname, O_RDONLY, 0);
data/apparmor-3.0.0/tests/regression/apparmor/readdir.c:76:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(dirname, O_RDONLY, 0);
data/apparmor-3.0.0/tests/regression/apparmor/rw.c:30:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char buf[128];
data/apparmor-3.0.0/tests/regression/apparmor/rw.c:50:5:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd=open(argv[1], O_CREAT|O_EXCL|O_RDWR, S_IWUSR|S_IRUSR);
data/apparmor-3.0.0/tests/regression/apparmor/socketpair.c:41: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).
		pair[0] = atoi(fd0);
data/apparmor-3.0.0/tests/regression/apparmor/socketpair.c:42: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).
		pair[1] = atoi(fd1);
data/apparmor-3.0.0/tests/regression/apparmor/socketpair.c: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 fd_str[32];
data/apparmor-3.0.0/tests/regression/apparmor/syscall_chroot.c:45:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy (&tmp->dirent, dirent, sizeof (struct dirent));
data/apparmor-3.0.0/tests/regression/apparmor/syscall_query_module.c:19:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[BUFSIZE];
data/apparmor-3.0.0/tests/regression/apparmor/syscall_setdomainname.c:23:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char saved_domain[BUFSIZE];
data/apparmor-3.0.0/tests/regression/apparmor/syscall_setdomainname.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 new_domain[BUFSIZE];
data/apparmor-3.0.0/tests/regression/apparmor/syscall_sethostname.c:23:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char saved_hostname[BUFSIZE];
data/apparmor-3.0.0/tests/regression/apparmor/syscall_sethostname.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 new_hostname[BUFSIZE];
data/apparmor-3.0.0/tests/regression/apparmor/sysctl_proc.c:21:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char read_buffer[BUFSIZE], verify_buffer[BUFSIZE];
data/apparmor-3.0.0/tests/regression/apparmor/sysctl_proc.c:31:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(argv[1], O_RDONLY);
data/apparmor-3.0.0/tests/regression/apparmor/sysctl_proc.c:46:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(argv[1], O_WRONLY);
data/apparmor-3.0.0/tests/regression/apparmor/sysctl_proc.c:62:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(argv[1], O_RDWR);
data/apparmor-3.0.0/tests/regression/apparmor/tcp.c:33: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 data[BUFSIZE];
data/apparmor-3.0.0/tests/regression/apparmor/tcp.c: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 buffer[BUFSIZE];
data/apparmor-3.0.0/tests/regression/apparmor/tcp.c:166:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[BUFSIZE];
data/apparmor-3.0.0/tests/regression/apparmor/tcp.c:238:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(DATASOURCE, O_RDONLY);
data/apparmor-3.0.0/tests/regression/apparmor/unix_fd_client.c:29:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char read_buffer[17], f_buf[255];
data/apparmor-3.0.0/tests/regression/apparmor/unix_fd_server.c:36:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char comparison_buffer[17];
data/apparmor-3.0.0/tests/regression/apparmor/unix_fd_server.c:37:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char inbound_buffer[17];
data/apparmor-3.0.0/tests/regression/apparmor/unix_fd_server.c:48:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fd = open(argv[1], O_RDONLY)) < 0) {
data/apparmor-3.0.0/tests/regression/apparmor/unix_fd_server.c:124:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
       	memcpy(CMSG_DATA(ctrl_mesg), &fd, sizeof(fd));
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket.c:97:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char msg_buf[MSG_BUF_MAX];
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket.c:124: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(addr.sun_path, sun_path, sun_path_len);
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket.c:138: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(addr.sun_path, sun_path, sun_path_len);
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket.c:157:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(msg_buf, argv[3], msg_buf_len);
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket_client.c:37:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char msg_buf[MSG_BUF_MAX];
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket_client.c:73:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char msg_buf[MSG_BUF_MAX];
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket_client.c:96:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(addr.sun_path, peer_addr->sun_path, peer_path_len);
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket_client.c:181: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(peer_addr.sun_path, sun_path, sun_path_len);
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket_client.c:197: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(peer_addr.sun_path, sun_path, sun_path_len);
data/apparmor-3.0.0/tests/regression/apparmor/xattrs.c:30:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[256];
data/apparmor-3.0.0/tests/regression/apparmor/xattrs.c:44:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char value[256];
data/apparmor-3.0.0/tests/regression/apparmor/xattrs_profile.c:34: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, "r");
data/apparmor-3.0.0/tests/stress/apparmor/change_hat.c:33:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(o_file, O_RDONLY);
data/apparmor-3.0.0/tests/stress/apparmor/change_hat.c:46:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(o_file, O_RDONLY);
data/apparmor-3.0.0/tests/stress/apparmor/open.c:21:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(o_file, O_RDONLY);
data/apparmor-3.0.0/binutils/aa_exec.c:167:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		required_len += 1 + strlen(namespace) + 3; /* :<NAMESPACE>:// */
data/apparmor-3.0.0/binutils/aa_exec.c:170: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).
		required_len += strlen(profile);
data/apparmor-3.0.0/binutils/aa_exec.c:178: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(name, ":");
data/apparmor-3.0.0/binutils/aa_status.c:116: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).
	apparmor_profiles = malloc(strlen(apparmorfs) + 10); // /profiles\0
data/apparmor-3.0.0/binutils/aa_status.c:238:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		for (i = 0; ispid && i < strlen(entry->d_name); i++) {
data/apparmor-3.0.0/binutils/cJSON.c:194: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).
    length = strlen((const char*)string) + sizeof("");
data/apparmor-3.0.0/binutils/cJSON.c:404: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(valuestring) <= strlen(object->valuestring))
data/apparmor-3.0.0/binutils/cJSON.c:404:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(valuestring) <= strlen(object->valuestring))
data/apparmor-3.0.0/binutils/cJSON.c:532:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    buffer->offset += strlen((const char*)buffer_pointer);
data/apparmor-3.0.0/binutils/cJSON.c:1083: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).
    buffer_length = strlen(value) + sizeof("");
data/apparmor-3.0.0/binutils/cJSON.c:1410: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).
            raw_length = strlen(item->valuestring) + sizeof("");
data/apparmor-3.0.0/changehat/pam_apparmor/get_options.c:67: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).
	} else if (strncasecmp(argv, ORDER_PREFIX, strlen(ORDER_PREFIX)) != 0) {
data/apparmor-3.0.0/changehat/pam_apparmor/get_options.c:72:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	opts = argv + strlen(ORDER_PREFIX);
data/apparmor-3.0.0/changehat/pam_apparmor/get_options.c:137: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).
			opts += strlen(opts);
data/apparmor-3.0.0/libraries/libapparmor/src/features.c:121:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		len = read(file, pos, size);
data/apparmor-3.0.0/libraries/libapparmor/src/features.c:191:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (*name == '.' || !strlen(name))
data/apparmor-3.0.0/libraries/libapparmor/src/features.c:238: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).
	size_t len = strlen(string);
data/apparmor-3.0.0/libraries/libapparmor/src/features.c:611: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).
	size = strlen(string);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:48: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).
#define UNCONFINED_SIZE		strlen(UNCONFINED)
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:106:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		int size = read(fd, &buffer, 2);			\
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:348:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return splitcon(con, strlen(con), true, mode);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:386:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(fd, tmp, len);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:644: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).
	size = strlen(cmd) + 18 + totallen + 1;
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:654: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).
	pos = buf + strlen(buf);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:658: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).
			pos += strlen(*hats) + 1;
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:979:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(fd, buf, QUERY_LABEL_REPLY_LEN);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:1063: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).
	return aa_query_file_path_len(mask, label, strlen(label), path,
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:1064: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).
				      strlen(path), allowed, audited);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:1136: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).
	return aa_query_link_path_len(label, strlen(label), target,
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:1137: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).
				      strlen(target), link, strlen(link),
data/apparmor-3.0.0/libraries/libapparmor/src/kernel.c:1137: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).
				      strlen(target), link, strlen(link),
data/apparmor-3.0.0/libraries/libapparmor/src/kernel_interface.c:173:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		rsize = read(fd, buffer + size, asize - size);
data/apparmor-3.0.0/libraries/libapparmor/src/kernel_interface.c:388: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).
					    fqname, strlen(fqname) + 1);
data/apparmor-3.0.0/libraries/libapparmor/src/libaalogparse.c:139: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(hexstring) / 2;
data/apparmor-3.0.0/libraries/libapparmor/src/private.c:129: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).
	ssize_t name_len = strlen(name);
data/apparmor-3.0.0/libraries/libapparmor/src/tst_kernel.c:86: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 sz = size < 0 ? strlen(con) : size;		\
data/apparmor-3.0.0/parser/common_optarg.c:111: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(table[i].option) > longest)
data/apparmor-3.0.0/parser/common_optarg.c:112: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).
			longest = strlen(table[i].option);
data/apparmor-3.0.0/parser/lib.c:394:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		retval = strn_escseq(&pos, "", strlen(t->test));
data/apparmor-3.0.0/parser/lib.c:401:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		retval = strn_escseq(&pos, "", strlen(t->test));
data/apparmor-3.0.0/parser/lib.c:405: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).
		retval = strn_escseq(&pos, "*+.|^-[]()", strlen(t->test));
data/apparmor-3.0.0/parser/libapparmor_re/chfa.cc:413:57:  [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 hsize = pad64(sizeof(th) + sizeof(th_version) + strlen(name) + 1);
data/apparmor-3.0.0/parser/libapparmor_re/chfa.cc:427:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	os << fill64(sizeof(th) + sizeof(th_version) + strlen(name) + 1);
data/apparmor-3.0.0/parser/network.c:172:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	res = read(fd, &buffer, sizeof(buffer) - 1);
data/apparmor-3.0.0/parser/parser_alias.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).
	int len = strlen(target) - strlen(alias->from) + strlen(alias->to);
data/apparmor-3.0.0/parser/parser_alias.c:98: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).
	int len = strlen(target) - strlen(alias->from) + strlen(alias->to);
data/apparmor-3.0.0/parser/parser_alias.c:98:51:  [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(target) - strlen(alias->from) + strlen(alias->to);
data/apparmor-3.0.0/parser/parser_alias.c:104: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).
	sprintf(n, "%s%s", alias->to, target + strlen(alias->from));
data/apparmor-3.0.0/parser/parser_alias.c:120: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((*t)->from);
data/apparmor-3.0.0/parser/parser_alias.c:165: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((*t)->from);
data/apparmor-3.0.0/parser/parser_include.c:101: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).
	for (i = strlen(t) - 1; i >= 0 && t[i] == '/'; i--)
data/apparmor-3.0.0/parser/parser_include.c:130: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(dir);
data/apparmor-3.0.0/parser/parser_interface.c:249: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).
		sd_write16(buf, strlen(name) + 1);
data/apparmor-3.0.0/parser/parser_interface.c:250: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).
		buf.write(name, strlen(name) + 1);
data/apparmor-3.0.0/parser/parser_interface.c:287:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sd_write_strn(buf, b, strlen(b) + 1, name);
data/apparmor-3.0.0/parser/parser_interface.c:359: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).
		int len = strlen(table[i]) + 1;
data/apparmor-3.0.0/parser/parser_interface.c:404: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).
		autofree char *name = (char *) malloc(3 + strlen(profile->name) + strlen(profile->parent->name));
data/apparmor-3.0.0/parser/parser_interface.c:404:69:  [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).
		autofree char *name = (char *) malloc(3 + strlen(profile->name) + strlen(profile->parent->name));
data/apparmor-3.0.0/parser/parser_main.c:359: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(save) - 1;
data/apparmor-3.0.0/parser/parser_main.c:369:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (!strlen(save)) {
data/apparmor-3.0.0/parser/parser_main.c:579: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).
						optarg, strlen(optarg))) {
data/apparmor-3.0.0/parser/parser_main.c:853: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).
							   strlen(match_cn_abi)) == 0;
data/apparmor-3.0.0/parser/parser_main.c:856:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
						   strlen(match_n_abi)) == 0;
data/apparmor-3.0.0/parser/parser_main.c:863: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(match_c_abi)) == 0;
data/apparmor-3.0.0/parser/parser_misc.c:435:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(s, string, pos - string);
data/apparmor-3.0.0/parser/parser_misc.c:490: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(var);
data/apparmor-3.0.0/parser/parser_misc.c:871: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).
	*name_len = strlen(name_start);
data/apparmor-3.0.0/parser/parser_misc.c:1263: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).
		result_str = processunquoted((input), strlen((input)));			\
data/apparmor-3.0.0/parser/parser_misc.c:1303:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out = processquoted(teststring, strlen(teststring));
data/apparmor-3.0.0/parser/parser_misc.c:1310:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out = processquoted(teststring, strlen(teststring));
data/apparmor-3.0.0/parser/parser_misc.c:1317:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out = processquoted(teststring, strlen(teststring));
data/apparmor-3.0.0/parser/parser_misc.c:1324:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out = processquoted(teststring, strlen(teststring));
data/apparmor-3.0.0/parser/parser_misc.c:1331:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out = processquoted(teststring, strlen(teststring));
data/apparmor-3.0.0/parser/parser_misc.c:1338:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out = processquoted(teststring, strlen(teststring));
data/apparmor-3.0.0/parser/parser_misc.c:1345:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out = processquoted(teststring, strlen(teststring));
data/apparmor-3.0.0/parser/parser_misc.c:1352:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out = processquoted(teststring, strlen(teststring));
data/apparmor-3.0.0/parser/parser_misc.c:1359:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out = processquoted(teststring, strlen(teststring));
data/apparmor-3.0.0/parser/parser_misc.c:1366:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out = processquoted(teststring, strlen(teststring));
data/apparmor-3.0.0/parser/parser_misc.c:1373:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out = processquoted(teststring, strlen(teststring));
data/apparmor-3.0.0/parser/parser_misc.c:1380:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out = processquoted(teststring, strlen(teststring));
data/apparmor-3.0.0/parser/parser_misc.c:1387:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out = processquoted(teststring, strlen(teststring));
data/apparmor-3.0.0/parser/parser_misc.c:1394:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out = processquoted(teststring, strlen(teststring));
data/apparmor-3.0.0/parser/parser_misc.c:1401:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	out = processquoted(teststring, strlen(teststring));
data/apparmor-3.0.0/parser/parser_policy.c:113: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).
			name = (char *) malloc(strlen(prof->name) + strlen(entry->nt_name)
data/apparmor-3.0.0/parser/parser_policy.c:113: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).
			name = (char *) malloc(strlen(prof->name) + strlen(entry->nt_name)
data/apparmor-3.0.0/parser/parser_regex.c:55:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (!path || (strlen(path) < 2))
data/apparmor-3.0.0/parser/parser_regex.c:484: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).
		prof->xmatch_len = strlen(name);
data/apparmor-3.0.0/parser/parser_variable.c:59:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	unsigned int offset = strlen("@{");
data/apparmor-3.0.0/parser/parser_variable.c:71: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(var_end + 1) != 0) {
data/apparmor-3.0.0/parser/parser_variable.c:191: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 (split_var->prefix && split_var->prefix[strlen(split_var->prefix) - 1] == '/')
data/apparmor-3.0.0/parser/parser_variable.c:349: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).
	MY_TEST(retchar - testchar == strlen("TRUE"), "get var end for TRUE}");
data/apparmor-3.0.0/parser/parser_variable.c:353: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).
	MY_TEST(retchar - testchar == strlen("some_var"), "get var end for some_var}");
data/apparmor-3.0.0/parser/parser_variable.c:357: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).
	MY_TEST(retchar - testchar == strlen("some_var"), "get var end for some_var} 2");
data/apparmor-3.0.0/parser/parser_variable.c:380: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).
	var_start = tst_string + strlen(prefix);
data/apparmor-3.0.0/parser/parser_variable.c:381:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	var_end = var_start + strlen(var) + strlen("@\{");
data/apparmor-3.0.0/parser/parser_variable.c:381:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	var_end = var_start + strlen(var) + strlen("@\{");
data/apparmor-3.0.0/parser/parser_variable.c:391:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	var_end = var_start + strlen(var) + strlen("@\{");
data/apparmor-3.0.0/parser/parser_variable.c:391:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	var_end = var_start + strlen(var) + strlen("@\{");
data/apparmor-3.0.0/parser/parser_variable.c:400: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).
	var_start = tst_string + strlen(prefix);
data/apparmor-3.0.0/parser/parser_variable.c:401:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	var_end = var_start + strlen(var) + strlen("@\{");
data/apparmor-3.0.0/parser/parser_variable.c:401:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	var_end = var_start + strlen(var) + strlen("@\{");
data/apparmor-3.0.0/parser/parser_variable.c:411:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	var_end = var_start + strlen(var) + strlen("@\{");
data/apparmor-3.0.0/parser/parser_variable.c:411:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	var_end = var_start + strlen(var) + strlen("@\{");
data/apparmor-3.0.0/parser/parser_variable.c:479:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	tmp = strndup(tst_string, strlen(prefix) + 2);
data/apparmor-3.0.0/parser/parser_variable.c:515:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	tmp = strndup(tst_string, strlen(prefix) + 2);
data/apparmor-3.0.0/tests/regression/apparmor/changehat.h:21:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        rc=write(fd, data, strlen(data));
data/apparmor-3.0.0/tests/regression/apparmor/changehat.h:23:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (rc != strlen(data)){
data/apparmor-3.0.0/tests/regression/apparmor/changehat.h:30:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        rc=read(fd, buf, sizeof(buf));
data/apparmor-3.0.0/tests/regression/apparmor/changehat.h:32:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (rc != strlen(data)){
data/apparmor-3.0.0/tests/regression/apparmor/changehat.h:38:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (memcmp(buf, data, strlen(data)) != 0){
data/apparmor-3.0.0/tests/regression/apparmor/changehat_wrapper.c:70:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	rc = write (fd, buf, strlen(buf));
data/apparmor-3.0.0/tests/regression/apparmor/changehat_wrapper.c:72: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 (rc != strlen(buf)) {
data/apparmor-3.0.0/tests/regression/apparmor/changehat_wrapper.c:104: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).
					(char *) malloc(strlen(optarg) + 1);
data/apparmor-3.0.0/tests/regression/apparmor/changehat_wrapper.c:143:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(filedes[0], &buf, sizeof(buf));
data/apparmor-3.0.0/tests/regression/apparmor/changehat_wrapper.c:152: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).
		char * pname = malloc (strlen(argv[optind]) + 3);
data/apparmor-3.0.0/tests/regression/apparmor/clone.c:49: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).
	rc = write(filedes[1], "PASS\n", strlen("PASS\n"));
data/apparmor-3.0.0/tests/regression/apparmor/clone.c:100:2:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	read(filedes[0], &buf, sizeof(buf));
data/apparmor-3.0.0/tests/regression/apparmor/deleted.c:56: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).
        rc = write(fd, data, strlen(data));
data/apparmor-3.0.0/tests/regression/apparmor/deleted.c:57:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (rc != strlen(data)){
data/apparmor-3.0.0/tests/regression/apparmor/deleted.c:82:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        rc = read(fd, buf, sizeof(buf));
data/apparmor-3.0.0/tests/regression/apparmor/deleted.c:84:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (rc != strlen(data)){
data/apparmor-3.0.0/tests/regression/apparmor/deleted.c:106:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        rc=read(fd, buf, sizeof(buf));
data/apparmor-3.0.0/tests/regression/apparmor/deleted.c:108:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (rc != strlen(data)){
data/apparmor-3.0.0/tests/regression/apparmor/dropprivs_wrapper.c:60: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).
	pname = malloc (strlen(argv[1]) + 3);
data/apparmor-3.0.0/tests/regression/apparmor/fd_inheritance.c:47:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = read(fd, buf, BUF_LEN);
data/apparmor-3.0.0/tests/regression/apparmor/fd_inheritor.c:46:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = read(fd, buf, BUF_LEN);
data/apparmor-3.0.0/tests/regression/apparmor/introspect.c:70:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (rc != strlen(profile) + strlen(mode) + 4) {
data/apparmor-3.0.0/tests/regression/apparmor/introspect.c:70:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (rc != strlen(profile) + strlen(mode) + 4) {
data/apparmor-3.0.0/tests/regression/apparmor/introspect.c:74: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(profile) + strlen(mode) + 4, rc);
data/apparmor-3.0.0/tests/regression/apparmor/introspect.c:74:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				strlen(profile) + strlen(mode) + 4, rc);
data/apparmor-3.0.0/tests/regression/apparmor/introspect.c:77: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).
	} else if (rc != strlen(profile) + 1) {
data/apparmor-3.0.0/tests/regression/apparmor/introspect.c:81:4:  [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(profile) + 1, rc);
data/apparmor-3.0.0/tests/regression/apparmor/link_subset.c:205: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).
		char *b, *buffer = malloc(MAX_PERM * (strlen(argv[2] + 2*MAX_PERM_LEN +2)));
data/apparmor-3.0.0/tests/regression/apparmor/link_subset.c:210: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).
		lname = malloc(strlen(argv[2]) + 2*MAX_PERM_LEN + 2);
data/apparmor-3.0.0/tests/regression/apparmor/link_subset.c:221: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).
			b += strlen(lname);
data/apparmor-3.0.0/tests/regression/apparmor/link_subset.c:228:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	tname = malloc(strlen(argv[1]) + 2*MAX_PERM_LEN + 2);
data/apparmor-3.0.0/tests/regression/apparmor/link_subset.c:229:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	lname = malloc(strlen(argv[2]) + 2*MAX_PERM_LEN + 2);
data/apparmor-3.0.0/tests/regression/apparmor/mmap.c:79: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).
	(void)memcpy(mptr, data, strlen(data));
data/apparmor-3.0.0/tests/regression/apparmor/mmap.c:81: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).
	if (msync(mptr, strlen(data), MS_SYNC) == -1){
data/apparmor-3.0.0/tests/regression/apparmor/mmap.c:89:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc=read(fd, buf, strlen(data));
data/apparmor-3.0.0/tests/regression/apparmor/mmap.c:89: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).
	rc=read(fd, buf, strlen(data));
data/apparmor-3.0.0/tests/regression/apparmor/mmap.c:91: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 (rc != strlen(data)){
data/apparmor-3.0.0/tests/regression/apparmor/mmap.c:97:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (memcmp(buf, mptr, strlen(data)) != 0){
data/apparmor-3.0.0/tests/regression/apparmor/named_pipe.c:29:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        rc=read(fd, buf, sizeof(buf));
data/apparmor-3.0.0/tests/regression/apparmor/named_pipe.c:31:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (rc != strlen(data)){
data/apparmor-3.0.0/tests/regression/apparmor/named_pipe.c:37:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (memcmp(buf, data, strlen(data)) != 0){
data/apparmor-3.0.0/tests/regression/apparmor/named_pipe.c:52:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        rc=write(fd, data, strlen(data));
data/apparmor-3.0.0/tests/regression/apparmor/named_pipe.c:54:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (rc != strlen(data)){
data/apparmor-3.0.0/tests/regression/apparmor/netdomain/test_multi_send.c:74:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (sendto(sock, message, strlen(message), 0, (struct sockaddr *) &remote, sizeof(remote)) <= 0)
data/apparmor-3.0.0/tests/regression/apparmor/netdomain/test_multi_send.c:115:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (send(sock, message, strlen(message), 0) <= 0)
data/apparmor-3.0.0/tests/regression/apparmor/pipe.c:34:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        rc=read(fd, buf, sizeof(buf));
data/apparmor-3.0.0/tests/regression/apparmor/pipe.c:36:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (rc != strlen(data)){
data/apparmor-3.0.0/tests/regression/apparmor/pipe.c:42:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (memcmp(buf, data, strlen(data)) != 0){
data/apparmor-3.0.0/tests/regression/apparmor/pipe.c:57:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        rc=write(fd, data, strlen(data));
data/apparmor-3.0.0/tests/regression/apparmor/pipe.c:59:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (rc != strlen(data)){
data/apparmor-3.0.0/tests/regression/apparmor/pwrite.c:32:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	char in_buffer[strlen(bugger) +1];
data/apparmor-3.0.0/tests/regression/apparmor/pwrite.c:60: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).
	ret = pwrite(fd, bugger, strlen(bugger), 0);
data/apparmor-3.0.0/tests/regression/apparmor/pwrite.c:68: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).
	} else if (ret != strlen(bugger)) {
data/apparmor-3.0.0/tests/regression/apparmor/pwrite.c:70: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).
			ret, strlen(bugger));
data/apparmor-3.0.0/tests/regression/apparmor/pwrite.c:75: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).
	ret = pread(fd, in_buffer, strlen(bugger), 0);
data/apparmor-3.0.0/tests/regression/apparmor/pwrite.c:80: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).
	}  else if (ret != strlen(bugger)) {
data/apparmor-3.0.0/tests/regression/apparmor/pwrite.c:82: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).
			ret, strlen(bugger));
data/apparmor-3.0.0/tests/regression/apparmor/pwrite.c:84: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).
	} else if (memcmp(bugger, in_buffer, strlen(bugger)) != 0) {
data/apparmor-3.0.0/tests/regression/apparmor/query_label.c:7: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).
#define OPT_EXPECT_LEN		strlen(OPT_EXPECT)
data/apparmor-3.0.0/tests/regression/apparmor/query_label.c:10:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define OPT_LABEL_LEN		strlen(OPT_LABEL)
data/apparmor-3.0.0/tests/regression/apparmor/query_label.c:13: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).
#define OPT_TYPE_DBUS_LEN	strlen(OPT_TYPE_DBUS)
data/apparmor-3.0.0/tests/regression/apparmor/query_label.c:16: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).
#define OPT_TYPE_FILE_LEN	strlen(OPT_TYPE_FILE)
data/apparmor-3.0.0/tests/regression/apparmor/query_label.c:228: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).
	label_size = strlen(label);
data/apparmor-3.0.0/tests/regression/apparmor/query_label.c:232: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).
			size += strlen(argv[i]);
data/apparmor-3.0.0/tests/regression/apparmor/rw.c:62: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).
	rc=write(fd, data, strlen(data));
data/apparmor-3.0.0/tests/regression/apparmor/rw.c:64: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 (rc != strlen(data)){
data/apparmor-3.0.0/tests/regression/apparmor/rw.c:71:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc=read(fd, buf, sizeof(buf));
data/apparmor-3.0.0/tests/regression/apparmor/rw.c:73: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 (rc != strlen(data)){
data/apparmor-3.0.0/tests/regression/apparmor/rw.c:79:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (memcmp(buf, data, strlen(data)) != 0){
data/apparmor-3.0.0/tests/regression/apparmor/socketpair.c:84:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	expected_rc = strlen(expected_label);
data/apparmor-3.0.0/tests/regression/apparmor/socketpair.c:87: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).
		expected_rc += 1 + 1 + strlen(expected_mode) + 1;
data/apparmor-3.0.0/tests/regression/apparmor/syscall_setdomainname.c:35: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).
	newlen = strlen(argv[1]);
data/apparmor-3.0.0/tests/regression/apparmor/syscall_setdomainname.c:49:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (setdomainname(argv[1], strlen(argv[1])) == -1) {
data/apparmor-3.0.0/tests/regression/apparmor/syscall_setdomainname.c:74:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (setdomainname(saved_domain, strlen(saved_domain)) == -1) {
data/apparmor-3.0.0/tests/regression/apparmor/syscall_sethostname.c:35: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).
	newlen = strlen(argv[1]);
data/apparmor-3.0.0/tests/regression/apparmor/syscall_sethostname.c:49: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).
	if (sethostname(argv[1], strlen(argv[1])) == -1) {
data/apparmor-3.0.0/tests/regression/apparmor/syscall_sethostname.c:74:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (sethostname(saved_hostname, strlen(saved_hostname)) == -1) {
data/apparmor-3.0.0/tests/regression/apparmor/sysctl_proc.c:37:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read_size = read(fd, &read_buffer, sizeof(read_buffer));
data/apparmor-3.0.0/tests/regression/apparmor/sysctl_proc.c:52: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).
		write_size = write(fd, argv[3], strlen(argv[3]));
data/apparmor-3.0.0/tests/regression/apparmor/sysctl_proc.c:68:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read_size = read(fd, &read_buffer, sizeof(read_buffer));
data/apparmor-3.0.0/tests/regression/apparmor/sysctl_proc.c:83:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read_size = read(fd, &verify_buffer, sizeof(verify_buffer));
data/apparmor-3.0.0/tests/regression/apparmor/tcp.c:244:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ((retval = read(fd, data, sizeof(data))) < sizeof(data)) {
data/apparmor-3.0.0/tests/regression/apparmor/transition.c:32: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).
#define STACK_DELIM_LEN	strlen(STACK_DELIM)
data/apparmor-3.0.0/tests/regression/apparmor/transition.c:78: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).
		sl->len = strlen(sl->label);
data/apparmor-3.0.0/tests/regression/apparmor/transition.c:201: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).
	expected_rc = expected_label ? strlen(expected_label) : strlen(label);
data/apparmor-3.0.0/tests/regression/apparmor/transition.c:201:58:  [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).
	expected_rc = expected_label ? strlen(expected_label) : strlen(label);
data/apparmor-3.0.0/tests/regression/apparmor/transition.c:209: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).
		expected_rc += 1 + 1 + strlen(expected_mode) + 1;
data/apparmor-3.0.0/tests/regression/apparmor/transition.c:211: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).
		expected_rc += 1 + 1 + strlen(mode) + 1;
data/apparmor-3.0.0/tests/regression/apparmor/unix_fd_client.c:42: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(remote.sun_path) + sizeof(remote.sun_family);
data/apparmor-3.0.0/tests/regression/apparmor/unix_fd_client.c:77: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).
		send(sock, read_buffer, strlen(read_buffer),0);
data/apparmor-3.0.0/tests/regression/apparmor/unix_fd_server.c:78: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(local.sun_path) + sizeof(local.sun_family);
data/apparmor-3.0.0/tests/regression/apparmor/unix_fd_server.c:112:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
       	vect.iov_len = strlen(argv[2]) + 1;
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket.c:55:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = read(peer_sock, msg_buf, msg_buf_len);
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket.c:118:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sun_path_len = strlen(sun_path);
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket.c:152:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	msg_buf_len = strlen(argv[3]) + 1;
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket_client.c:31: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).
#define SUN_PATH_SUFFIX_LEN	strlen(SUN_PATH_SUFFIX)
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket_client.c:54:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = read(sock, msg_buf, MSG_BUF_MAX);
data/apparmor-3.0.0/tests/regression/apparmor/unix_socket_client.c:175:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sun_path_len = strlen(sun_path);
data/apparmor-3.0.0/tests/regression/apparmor/xattrs.c:18:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define msglen (strlen(msgstring)+1)

ANALYSIS SUMMARY:

Hits = 446
Lines analyzed = 38011 in approximately 1.73 seconds (21980 lines/second)
Physical Source Lines of Code (SLOC) = 26920
Hits@level = [0] 629 [1] 204 [2] 171 [3]  15 [4]  52 [5]   4
Hits@level+ = [0+] 1075 [1+] 446 [2+] 242 [3+]  71 [4+]  56 [5+]   4
Hits/KSLOC@level+ = [0+] 39.9331 [1+] 16.5676 [2+] 8.9896 [3+] 2.63744 [4+] 2.08024 [5+] 0.148588
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.