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/snapd-2.45.2/cmd/decode-mount-opts/decode-mount-opts.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/apparmor-support.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/apparmor-support.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/cgroup-freezer-support.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/cgroup-freezer-support.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/cgroup-pids-support.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/cgroup-pids-support.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/cgroup-support.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/cgroup-support.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/classic-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/classic.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/classic.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/cleanup-funcs-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/cleanup-funcs.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/cleanup-funcs.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/error-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/error.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/error.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/fault-injection-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/fault-injection.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/fault-injection.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/feature-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/feature.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/feature.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/infofile-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/infofile.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/infofile.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/locking-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/locking.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/locking.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/mount-opt-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/mount-opt.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/mount-opt.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/mountinfo-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/mountinfo.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/mountinfo.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/panic-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/panic.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/panic.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/privs-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/privs.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/privs.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/secure-getenv-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/secure-getenv.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/secure-getenv.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/snap-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/snap.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/snap.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/test-utils-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/test-utils.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/test-utils.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/tool.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/tool.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/unit-tests-main.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/unit-tests.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/unit-tests.h
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/utils-test.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/utils.c
Examining data/snapd-2.45.2/cmd/libsnap-confine-private/utils.h
Examining data/snapd-2.45.2/cmd/snap-confine/cookie-support-test.c
Examining data/snapd-2.45.2/cmd/snap-confine/cookie-support.c
Examining data/snapd-2.45.2/cmd/snap-confine/cookie-support.h
Examining data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c
Examining data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.h
Examining data/snapd-2.45.2/cmd/snap-confine/mount-support-test.c
Examining data/snapd-2.45.2/cmd/snap-confine/mount-support.c
Examining data/snapd-2.45.2/cmd/snap-confine/mount-support.h
Examining data/snapd-2.45.2/cmd/snap-confine/ns-support-test.c
Examining data/snapd-2.45.2/cmd/snap-confine/ns-support.c
Examining data/snapd-2.45.2/cmd/snap-confine/ns-support.h
Examining data/snapd-2.45.2/cmd/snap-confine/seccomp-support-ext.c
Examining data/snapd-2.45.2/cmd/snap-confine/seccomp-support-ext.h
Examining data/snapd-2.45.2/cmd/snap-confine/seccomp-support.c
Examining data/snapd-2.45.2/cmd/snap-confine/seccomp-support.h
Examining data/snapd-2.45.2/cmd/snap-confine/selinux-support.c
Examining data/snapd-2.45.2/cmd/snap-confine/selinux-support.h
Examining data/snapd-2.45.2/cmd/snap-confine/snap-confine-args-test.c
Examining data/snapd-2.45.2/cmd/snap-confine/snap-confine-args.c
Examining data/snapd-2.45.2/cmd/snap-confine/snap-confine-args.h
Examining data/snapd-2.45.2/cmd/snap-confine/snap-confine-invocation-test.c
Examining data/snapd-2.45.2/cmd/snap-confine/snap-confine-invocation.c
Examining data/snapd-2.45.2/cmd/snap-confine/snap-confine-invocation.h
Examining data/snapd-2.45.2/cmd/snap-confine/snap-confine.c
Examining data/snapd-2.45.2/cmd/snap-confine/snap-device-helper-test.c
Examining data/snapd-2.45.2/cmd/snap-confine/udev-support.c
Examining data/snapd-2.45.2/cmd/snap-confine/udev-support.h
Examining data/snapd-2.45.2/cmd/snap-confine/user-support.c
Examining data/snapd-2.45.2/cmd/snap-confine/user-support.h
Examining data/snapd-2.45.2/cmd/snap-discard-ns/snap-discard-ns.c
Examining data/snapd-2.45.2/cmd/snap-gdb-shim/snap-gdb-shim.c
Examining data/snapd-2.45.2/cmd/snap-seccomp-blacklist/snap-seccomp-blacklist.c
Examining data/snapd-2.45.2/cmd/snap-update-ns/bootstrap.c
Examining data/snapd-2.45.2/cmd/snap-update-ns/bootstrap.h
Examining data/snapd-2.45.2/cmd/snapd-env-generator/main.c
Examining data/snapd-2.45.2/cmd/snapd-generator/main.c
Examining data/snapd-2.45.2/cmd/system-shutdown/system-shutdown-utils-test.c
Examining data/snapd-2.45.2/cmd/system-shutdown/system-shutdown-utils.c
Examining data/snapd-2.45.2/cmd/system-shutdown/system-shutdown-utils.h
Examining data/snapd-2.45.2/cmd/system-shutdown/system-shutdown.c
Examining data/snapd-2.45.2/include/lk/snappy_boot_v1.h
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-accounts-service/list-accounts.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-audio-record/src/parec-simple.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/chown.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/display.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/display.h
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/drop-exec.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/drop-syscall.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/drop-syscall32.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/drop.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/fchown.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/fchownat.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/lchown.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/setgid.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/setregid.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/setresgid.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/setresuid.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/setreuid.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/setuid.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-eds/calendar.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-eds/contacts.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-gpio-memory-control/gpiomem.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-hello-classic/test-snapd-hello-classic.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-pulseaudio/src/parec-simple.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-setpriority/setpriority.c
Examining data/snapd-2.45.2/tests/lib/snaps/test-snapd-uhid/uhid-test.c
Examining data/snapd-2.45.2/tests/main/snap-confine-drops-sys-admin/has-sys-admin.c
Examining data/snapd-2.45.2/tests/main/snap-confine-privs/uids-and-gids.c
Examining data/snapd-2.45.2/tests/regression/lp-1812973/lp-1812973.c

FINAL RESULTS:

data/snapd-2.45.2/cmd/libsnap-confine-private/tool.c:166:6:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	if (readlink("/proc/self/exe", buf, sizeof buf) < 0) {
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:209:8:  [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.
			    readlink(pathname, hostfs_symlink_target,
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:273:19:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	if (res == 0 && (chown(libgl_dir, 0, 0) < 0)) {
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:425:19:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	if (res == 0 && (chown(dst, 0, 0) < 0)) {
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:553:19:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	if (res == 0 && (chown(SC_LIB, 0, 0) < 0)) {
data/snapd-2.45.2/cmd/snap-confine/mount-support.c:406:11:  [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.
		nread = readlink("/proc/self/exe", self, sizeof self - 1);
data/snapd-2.45.2/cmd/snap-confine/mount-support.c:460:7:  [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(SC_HOSTFS_DIR, 0, 0) < 0) {
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:386:6:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	if (readlink(inv->rootfs_dir, base_snap_rev, sizeof base_snap_rev) < 0) {
data/snapd-2.45.2/cmd/snap-confine/snap-confine.c:196: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.
	nread = readlink(fd_path, orig_cwd, sizeof orig_cwd);
data/snapd-2.45.2/cmd/snap-confine/user-support.c:68:20:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	if (errno == 0 && chmod(xdg_runtime_dir, 0700) != 0) {
data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/chown.c:46: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, gid) < 0) {
data/snapd-2.45.2/cmd/libsnap-confine-private/classic.c:45: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(meta_snap_yaml, F_OK) == 0) {
data/snapd-2.45.2/cmd/libsnap-confine-private/error.h:89:16:  [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.
	       format(printf, 3, 4) SC_APPEND_RETURNS_NONNULL))
data/snapd-2.45.2/cmd/libsnap-confine-private/error.h:99:16:  [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.
	       format(printf, 1, 2) SC_APPEND_RETURNS_NONNULL))
data/snapd-2.45.2/cmd/libsnap-confine-private/error.h:109:16:  [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.
	       format(printf, 1, 2) SC_APPEND_RETURNS_NONNULL))
data/snapd-2.45.2/cmd/libsnap-confine-private/error.h:121:16:  [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.
	       format(printf, 2, 3) SC_APPEND_RETURNS_NONNULL))
data/snapd-2.45.2/cmd/libsnap-confine-private/panic-test.c:54: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, ap);
data/snapd-2.45.2/cmd/libsnap-confine-private/panic.c:43: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, fmt, ap);
data/snapd-2.45.2/cmd/libsnap-confine-private/panic.h:40:33:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((noreturn, format(printf, 1, 2))) void sc_panic(const char *fmt, ...);
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils.c:97: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.
	n = vsnprintf(str, size, format, va);
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils.h:49:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format(printf, 3, 4)))
data/snapd-2.45.2/cmd/libsnap-confine-private/test-utils-test.c:28:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access("/nonexistent", F_OK) == 0) {
data/snapd-2.45.2/cmd/libsnap-confine-private/utils.c:123:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(stderr, msg, va);
data/snapd-2.45.2/cmd/libsnap-confine-private/utils.h:24:27:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format(printf, 1, 2)))
data/snapd-2.45.2/cmd/libsnap-confine-private/utils.h:27:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format(printf, 1, 2)))
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:417:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(src, F_OK) != 0) {
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:459:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(driver_path, F_OK) == 0) {
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:544:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(SC_NVIDIA_DRIVER_VERSION_FILE, F_OK) != 0) {
data/snapd-2.45.2/cmd/snap-confine/mount-support.c:331:8:  [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(dir, F_OK) != 0) {
data/snapd-2.45.2/cmd/snap-confine/seccomp-support.c:141: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(profile_path, F_OK) == 0) {
data/snapd-2.45.2/cmd/snap-confine/seccomp-support.c:180:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(profile_path, F_OK) != 0) {
data/snapd-2.45.2/cmd/snap-confine/snap-confine-invocation.c:102:9:  [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(inv->rootfs_dir, F_OK) == 0) {
data/snapd-2.45.2/cmd/snap-confine/snap-confine-invocation.c:117:13:  [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(mount_point, F_OK) == 0) {
data/snapd-2.45.2/cmd/snap-confine/snap-confine-invocation.c:135:13:  [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(mount_point, F_OK) == 0) {
data/snapd-2.45.2/cmd/snap-confine/snap-confine.c:546: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(invocation.executable, (char *const *)&argv[0]);
data/snapd-2.45.2/cmd/snap-confine/udev-support.c:72: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("/usr/lib/snapd/snap-device-helper", X_OK) == 0)
data/snapd-2.45.2/cmd/snap-confine/udev-support.c:73:4:  [4] (shell) execle:
  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.
			execle("/usr/lib/snapd/snap-device-helper",
data/snapd-2.45.2/cmd/snap-confine/udev-support.c:76:12:  [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.
		else if (access("/usr/libexec/snapd/snap-device-helper", X_OK) == 0)
data/snapd-2.45.2/cmd/snap-confine/udev-support.c:77:4:  [4] (shell) execle:
  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.
			execle("/usr/libexec/snapd/snap-device-helper",
data/snapd-2.45.2/cmd/snap-confine/udev-support.c:81:4:  [4] (shell) execle:
  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.
			execle("/lib/udev/snappy-app-dev",
data/snapd-2.45.2/cmd/snap-gdb-shim/snap-gdb-shim.c:42: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(executable, (char *const *)&argv[1]);
data/snapd-2.45.2/cmd/snap-seccomp-blacklist/snap-seccomp-blacklist.c:15:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format(printf, 1, 2))) static void showerr(const char *fmt, ...);
data/snapd-2.45.2/cmd/snap-seccomp-blacklist/snap-seccomp-blacklist.c:20:5:  [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, va);
data/snapd-2.45.2/cmd/system-shutdown/system-shutdown-utils.c:38:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format(printf, 1, 2)))
data/snapd-2.45.2/cmd/system-shutdown/system-shutdown-utils.c:52: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(kmsg, fmt, va);
data/snapd-2.45.2/cmd/system-shutdown/system-shutdown-utils.h:28:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format(printf, 1, 2)))
data/snapd-2.45.2/cmd/system-shutdown/system-shutdown.c:43: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, ap);
data/snapd-2.45.2/tests/lib/snaps/test-snapd-audio-record/src/parec-simple.c:51:9:  [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, __FILE__": pa_simple_new() failed: %s\n", pa_strerror(error));
data/snapd-2.45.2/tests/lib/snaps/test-snapd-audio-record/src/parec-simple.c:59:9:  [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, __FILE__": pa_simple_read() failed: %s\n", pa_strerror(error));
data/snapd-2.45.2/tests/lib/snaps/test-snapd-audio-record/src/parec-simple.c:64:9:  [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, __FILE__": write() failed: %s\n", strerror(errno));
data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/drop-exec.c:55: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[2], (char *const *)&argv[2]);
data/snapd-2.45.2/tests/lib/snaps/test-snapd-pulseaudio/src/parec-simple.c:51:9:  [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, __FILE__": pa_simple_new() failed: %s\n", pa_strerror(error));
data/snapd-2.45.2/tests/lib/snaps/test-snapd-pulseaudio/src/parec-simple.c:59:9:  [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, __FILE__": pa_simple_read() failed: %s\n", pa_strerror(error));
data/snapd-2.45.2/tests/lib/snaps/test-snapd-pulseaudio/src/parec-simple.c:64:9:  [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, __FILE__": write() failed: %s\n", strerror(errno));
data/snapd-2.45.2/cmd/libsnap-confine-private/locking-test.c:51:14:  [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.
		lock_dir = getenv("SNAP_CONFINE_LOCK_DIR");
data/snapd-2.45.2/cmd/libsnap-confine-private/secure-getenv.c:29:9:  [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.
	return getenv(name);
data/snapd-2.45.2/cmd/libsnap-confine-private/tool.c:112:32:  [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.
	const char *xdg_runtime_dir = getenv("XDG_RUNTIME_DIR");
data/snapd-2.45.2/cmd/libsnap-confine-private/utils.c:91:26:  [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.
	const char *str_value = getenv(name);
data/snapd-2.45.2/cmd/snap-confine/ns-support-test.c:54:12:  [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.
		ns_dir = getenv("SNAP_CONFINE_NS_DIR");
data/snapd-2.45.2/cmd/snap-confine/seccomp-support.c:126:33:  [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.
	const char *MAX_PROFILE_WAIT = getenv("SNAP_CONFINE_MAX_PROFILE_WAIT");
data/snapd-2.45.2/cmd/snap-confine/snap-confine.c:338:39:  [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.
	const char *snap_instance_name_env = getenv("SNAP_INSTANCE_NAME");
data/snapd-2.45.2/cmd/snap-confine/user-support.c:29:26:  [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.
	const char *user_data = getenv("SNAP_USER_DATA");
data/snapd-2.45.2/cmd/snap-confine/user-support.c:52:32:  [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.
	const char *xdg_runtime_dir = getenv("XDG_RUNTIME_DIR");
data/snapd-2.45.2/cmd/snap-update-ns/bootstrap.c:486:22:  [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 *snapd_debug = getenv("SNAPD_DEBUG");
data/snapd-2.45.2/cmd/snapd-env-generator/main.c:33:15:  [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 *path = getenv("PATH");
data/snapd-2.45.2/tests/lib/snaps/test-snapd-hello-classic/test-snapd-hello-classic.c:9:25:  [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.
		printf("TMPDIR=%s\n", getenv("TMPDIR"));
data/snapd-2.45.2/cmd/decode-mount-opts/decode-mount-opts.c:35:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1000] = {0};
data/snapd-2.45.2/cmd/libsnap-confine-private/cgroup-freezer-support.c:40:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/cgroup-freezer-support.c:48:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/cgroup-freezer-support.c:53: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).
	cgroup_fd = open(freezer_cgroup_dir,
data/snapd-2.45.2/cmd/libsnap-confine-private/cgroup-freezer-support.c:60: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", O_PATH | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC);
data/snapd-2.45.2/cmd/libsnap-confine-private/cgroup-support.c:37: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).
    parent_fd = open(parent, O_PATH | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC);
data/snapd-2.45.2/cmd/libsnap-confine-private/cgroup-support.c:63:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[22] = {0};  // 2^64 base10 + 2 for NUL and '-' for long
data/snapd-2.45.2/cmd/libsnap-confine-private/classic.c:16:40:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *f SC_CLEANUP(sc_cleanup_file) = fopen(os_release, "r");
data/snapd-2.45.2/cmd/libsnap-confine-private/classic.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 buf[255] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/feature-test.c:54:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char subd[PATH_MAX];
data/snapd-2.45.2/cmd/libsnap-confine-private/feature-test.c:71:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pname[PATH_MAX];
data/snapd-2.45.2/cmd/libsnap-confine-private/feature-test.c:85:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pname[PATH_MAX];
data/snapd-2.45.2/cmd/libsnap-confine-private/feature.c:52:6:  [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(feature_flag_dir,
data/snapd-2.45.2/cmd/libsnap-confine-private/locking-test.c:85: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).
	lock_fd = open(lock_file, O_RDWR | O_CLOEXEC | O_NOFOLLOW);
data/snapd-2.45.2/cmd/libsnap-confine-private/locking.c:103:6:  [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(sc_lock_dir, O_DIRECTORY | O_PATH | O_CLOEXEC | O_NOFOLLOW);
data/snapd-2.45.2/cmd/libsnap-confine-private/locking.c:128:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char lock_fname[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/mount-opt-test.c:28:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1000] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/mount-opt-test.c:96:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cmd[10000] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/mount-opt-test.c:149:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char from[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/mount-opt-test.c:150:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char to[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/mount-opt-test.c:179:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cmd[1000] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/mount-opt.c:118: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 of[128] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/mount-opt.c:206: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 opts_buf[1000] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/mount-opt.c:264:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[10000] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/mount-opt.c:313:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[10000] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/mountinfo.c:82: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(fname, "rt");
data/snapd-2.45.2/cmd/libsnap-confine-private/mountinfo.h:86:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char line_buf[0];
data/snapd-2.45.2/cmd/libsnap-confine-private/snap-test.c:247:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char varname[sizeof good_bad_name] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/snap-test.c:249:20:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		g_assert_nonnull(memcpy(varname, good_bad_name, i));
data/snapd-2.45.2/cmd/libsnap-confine-private/snap-test.c:376: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 dest[10] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/snap-test.c:388: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 dest[3] = { 0 };	// "foo" sans the nil byte
data/snapd-2.45.2/cmd/libsnap-confine-private/snap-test.c:399: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 dest[10] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/snap-test.c:410: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 dest[SNAP_NAME_LEN + 1] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/snap-test.c:423:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[SNAP_NAME_LEN + 1] = { 0xff };
data/snapd-2.45.2/cmd/libsnap-confine-private/snap-test.c:454: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 dest[3] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/snap-test.c:466: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 dest[10] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/snap-test.c:477:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[SNAP_NAME_LEN + 1] = { 0xff };
data/snapd-2.45.2/cmd/libsnap-confine-private/snap-test.c:478:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char instance[20] = { 0xff };
data/snapd-2.45.2/cmd/libsnap-confine-private/snap.c:115:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char s[SNAP_INSTANCE_LEN + 1 + 1] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/snap.c:300: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(snap_name, instance_name, snap_name_len);
data/snapd-2.45.2/cmd/libsnap-confine-private/snap.c:308: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(instance_key, instance_key_start, instance_key_len);
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:79:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[5] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:87:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[5];
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:102:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char bigbuf[6];
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:105: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 buf[4];
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:134: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 bigbuf[6];
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:137: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 buf[4];
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:166:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[4] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:185:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[4] = { 0xFF, 0xFF, 0xFF, 0xFF };
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.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 buf[4];
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:221:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[4];
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:236:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[1] = { 0xFF };
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:245:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[1] = { 0xFF };
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:276:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[2] = { 0xFF, 0xFF };
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:306:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[1] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:322:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[2] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:337:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[16];
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:361:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[3] = { 0xFF, 0xFF, 0xFF };
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:394:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[2] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.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 buf[3] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:428:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[3] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:444:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[16];
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:462:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[16] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:476:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[16];
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:482:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char input[2] = { (unsigned char)c, 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils-test.c:494:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[16];
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils.c:87: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(copy, str, len + 1);
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils.c:127: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(dst + dst_len, str, str_len);
data/snapd-2.45.2/cmd/libsnap-confine-private/tool.c:80:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char aa_profile[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/tool.c:108:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char aa_profile[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/tool.c:113:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char xdg_runtime_dir_env[PATH_MAX + strlen("XDG_RUNTIME_DIR=")];
data/snapd-2.45.2/cmd/libsnap-confine-private/tool.c:165:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[PATH_MAX + 1] = { 0 };
data/snapd-2.45.2/cmd/libsnap-confine-private/tool.c:174:11:  [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).
	dir_fd = open(dir_name, O_PATH | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC);
data/snapd-2.45.2/cmd/libsnap-confine-private/utils.c:132: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).
	FILE *f = fopen(filepath, "w");
data/snapd-2.45.2/cmd/libsnap-confine-private/utils.c:205: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("/", open_flags);
data/snapd-2.45.2/cmd/snap-confine/cookie-support-test.c:51:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char path[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/cookie-support-test.c:57:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = fopen(path, "w");
data/snapd-2.45.2/cmd/snap-confine/cookie-support.c:42:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char context_path[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/cookie-support.c:49: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(context_path, O_RDONLY | O_NOFOLLOW | O_CLOEXEC);
data/snapd-2.45.2/cmd/snap-confine/cookie-support.c:58:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char context_val[255] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:151: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 glob_pattern_full[512] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:166: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 symlink_name[512] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:167: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 symlink_target[512] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:168: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 prefix_dir[512] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:205: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 hostfs_symlink_target[512] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:264:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[512] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:359:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char raw[128]; // The size was picked as "big enough" for version strings.
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:368:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	file = fopen(SC_NVIDIA_DRIVER_VERSION_FILE, "rt");
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:407:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char src[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:408:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char dst[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:439:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char driver_path[512] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support.c:80:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char base_dir[MAX_BUF] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support.c:81:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tmp_dir[MAX_BUF] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support.c:95:16:  [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).
	base_dir_fd = open(base_dir,
data/snapd-2.45.2/cmd/snap-confine/mount-support.c:225:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char src[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support.c:226:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char dst[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support.c:404: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 self[PATH_MAX + 1] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support.c:753:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char profile_path[PATH_MAX];
data/snapd-2.45.2/cmd/snap-confine/mount-support.c:798:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char src[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/mount-support.c:799:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char dst[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:80:16:  [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).
	init_mnt_fd = open(path_pid_1,
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:85:16:  [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).
	self_mnt_fd = open(path_pid_self,
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:90:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char init_buf[128] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:91:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char self_buf[128] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:113: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).
		init_mnt_fd_real = open(path_pid_1, O_RDONLY | O_CLOEXEC);
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:216:18:  [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).
	group->dir_fd = open(sc_ns_dir,
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:246:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char base_squashfs_path[PATH_MAX];
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:339:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char info_path[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:345: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).
	stream = fopen(info_path, "r");
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:381:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char base_snap_rev[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:538:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char mnt_fname[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:594:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char mnt_fname[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:776:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char src[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:777:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char dst[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:784:11:  [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 fd = open(dst, O_CREAT | O_CLOEXEC | O_NOFOLLOW | O_RDONLY, 0600);
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:800:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char src[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:801:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char dst[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:809:11:  [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 fd = open(dst, O_CREAT | O_CLOEXEC | O_NOFOLLOW | O_RDONLY, 0600);
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:892:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char info_path[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:896: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(info_path,
data/snapd-2.45.2/cmd/snap-confine/seccomp-support-ext.c:51:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *file = fopen(filename, "rb");
data/snapd-2.45.2/cmd/snap-confine/seccomp-support.c:116:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char profile_path[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/seccomp-support.c:163:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char bpf[MAX_BPF_SIZE + 1] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/seccomp-support.c:186:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char bpf[MAX_BPF_SIZE + 1] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/snap-confine-invocation.c:65:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char snap_name[SNAP_NAME_LEN + 1] = {0};
data/snapd-2.45.2/cmd/snap-confine/snap-confine-invocation.c:79:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char mount_point[PATH_MAX] = {0};
data/snapd-2.45.2/cmd/snap-confine/snap-confine-invocation.c:111: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 mount_point[PATH_MAX] = {0};
data/snapd-2.45.2/cmd/snap-confine/snap-confine-invocation.c:128: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 mount_point[PATH_MAX] = {0};
data/snapd-2.45.2/cmd/snap-confine/snap-confine.c:67: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("/var/lib", O_PATH | O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW);
data/snapd-2.45.2/cmd/snap-confine/snap-confine.c:186:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char fd_path[PATH_MAX];
data/snapd-2.45.2/cmd/snap-confine/snap-confine.c:187:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char orig_cwd[PATH_MAX];
data/snapd-2.45.2/cmd/snap-confine/snap-confine.c:210:6:  [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(orig_cwd, O_PATH | O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW);
data/snapd-2.45.2/cmd/snap-confine/snap-confine.c:267:16:  [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).
	void_dir_fd = open(sc_void_dir,
data/snapd-2.45.2/cmd/snap-confine/snap-confine.c:277: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).
		void_dir_fd = open(sc_void_dir,
data/snapd-2.45.2/cmd/snap-confine/udev-support.c:53:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[64] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/udev-support.c: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 cgroup_dir[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/udev-support.c:210:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cgroup_file[PATH_MAX] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/udev-support.c:214:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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] = { 0 };
data/snapd-2.45.2/cmd/snap-confine/udev-support.c:252:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char nv_path[15] = { 0 };	// /dev/nvidiaXXX
data/snapd-2.45.2/cmd/snap-confine/udev-support.h:31:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tagname[MAX_BUF];
data/snapd-2.45.2/cmd/snap-discard-ns/snap-discard-ns.c:80:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int ns_dir_fd = open(ns_dir_path, O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW);
data/snapd-2.45.2/cmd/snap-discard-ns/snap-discard-ns.c:111:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char sys_fstab_pattern[PATH_MAX];
data/snapd-2.45.2/cmd/snap-discard-ns/snap-discard-ns.c:112:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char usr_fstab_pattern[PATH_MAX];
data/snapd-2.45.2/cmd/snap-discard-ns/snap-discard-ns.c:113:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char sys_mnt_pattern[PATH_MAX];
data/snapd-2.45.2/cmd/snap-discard-ns/snap-discard-ns.c:114:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char usr_mnt_pattern[PATH_MAX];
data/snapd-2.45.2/cmd/snap-discard-ns/snap-discard-ns.c:115:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char sys_info_pattern[PATH_MAX];
data/snapd-2.45.2/cmd/snap-seccomp-blacklist/snap-seccomp-blacklist.c:159: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 fname[PATH_MAX];
data/snapd-2.45.2/cmd/snap-seccomp-blacklist/snap-seccomp-blacklist.c:180: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).
        fd = open(fname, O_CREAT | O_TRUNC | O_WRONLY | O_NOFOLLOW, 0644);
data/snapd-2.45.2/cmd/snap-seccomp-blacklist/snap-seccomp-blacklist.c:203: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).
        fd = open(fname, O_CREAT | O_TRUNC | O_WRONLY | O_NOFOLLOW, 0644);
data/snapd-2.45.2/cmd/snap-update-ns/bootstrap.c:52:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[PATH_MAX] = {
data/snapd-2.45.2/cmd/snap-update-ns/bootstrap.c:62:11:  [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 fd = open(buf, O_RDONLY | O_CLOEXEC | O_NOFOLLOW);
data/snapd-2.45.2/cmd/snap-update-ns/bootstrap.c:310:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char s[53] = { 0 };
data/snapd-2.45.2/cmd/snapd-env-generator/main.c:38:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[PATH_MAX + 1] = { 0 };
data/snapd-2.45.2/cmd/snapd-generator/main.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 fname[PATH_MAX + 1] = { 0 };
data/snapd-2.45.2/cmd/snapd-generator/main.c:79: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(fname, "wt");
data/snapd-2.45.2/cmd/system-shutdown/system-shutdown-utils.c:63: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("/run/systemd/reboot-param", "r");
data/snapd-2.45.2/cmd/system-shutdown/system-shutdown-utils.c:81:11:  [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 fd = open(src, O_RDONLY);
data/snapd-2.45.2/cmd/system-shutdown/system-shutdown.c:62:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char reboot_arg[256] = { 0 };
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:43:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char snap_mode[SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:45:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char snap_core[SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:47:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char snap_try_core[SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:49:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char snap_kernel[SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:51:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char snap_try_kernel[SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:54:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char gadget_mode[SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:56:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char snap_gadget[SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:58:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char snap_try_gadget [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:65:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char reboot_reason[SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:100:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char bootimg_matrix[SNAP_BOOTIMG_PART_NUM][2][SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:104:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char bootimg_file_name[SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:118:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char gadget_asset_matrix [SNAP_BOOTIMG_PART_NUM][2][SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:121:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_01 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:122:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_02 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:123:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_03 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:124:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_04 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:125:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_05 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:126:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_06 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:127:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_07 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:128:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_08 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:129:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_09 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:130:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_10 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:131:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_11 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:132:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_12 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:133:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_13 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:134:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_14 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:135:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_15 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:136:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_16 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:137:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_17 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:138:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_18 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:139:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_19 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:140:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char unused_key_20 [SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/include/lk/snappy_boot_v1.h:143:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char key_value_pairs [10][2][SNAP_NAME_MAX_LEN];
data/snapd-2.45.2/tests/lib/snaps/test-snapd-daemon-user/src/fchown.c:49:11:  [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 fd = open(argv[1], O_RDWR);
data/snapd-2.45.2/tests/lib/snaps/test-snapd-eds/calendar.c:118:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[4092];
data/snapd-2.45.2/tests/lib/snaps/test-snapd-eds/contacts.c:119:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[4092];
data/snapd-2.45.2/tests/lib/snaps/test-snapd-gpio-memory-control/gpiomem.c:24:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd = open("/dev/gpiomem", O_RDWR)) == -1) {
data/snapd-2.45.2/tests/lib/snaps/test-snapd-setpriority/setpriority.c:11: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).
		niceness = atoi(argv[1]);
data/snapd-2.45.2/tests/lib/snaps/test-snapd-uhid/uhid-test.c:152:5:  [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*)ev.u.create.name, "test-uhid-device");
data/snapd-2.45.2/tests/lib/snaps/test-snapd-uhid/uhid-test.c:174: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).
    fd = open(path, O_RDWR | O_CLOEXEC);
data/snapd-2.45.2/tests/regression/lp-1812973/lp-1812973.c:22: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).
    int fd = open("/dev/null", O_RDWR);
data/snapd-2.45.2/cmd/libsnap-confine-private/classic.c:26: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).
		size_t len = strlen(buf);
data/snapd-2.45.2/cmd/libsnap-confine-private/locking-test.c:143:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(7 * G_USEC_PER_SEC);
data/snapd-2.45.2/cmd/libsnap-confine-private/mountinfo.c:130: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).
	for (size_t i = 0; i < strlen(line); ++i) {
data/snapd-2.45.2/cmd/libsnap-confine-private/mountinfo.c:138: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).
	for (size_t i = 0; i < strlen(line); ++i)
data/snapd-2.45.2/cmd/libsnap-confine-private/mountinfo.c:223: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).
		output, strlen(output), input_idx, output_idx);
data/snapd-2.45.2/cmd/libsnap-confine-private/mountinfo.c:253:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sc_mountinfo_entry *entry = calloc(1, sizeof *entry + strlen(line) + 1);
data/snapd-2.45.2/cmd/libsnap-confine-private/mountinfo.c:260: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).
	memset(entry->line_buf, 1, strlen(line));
data/snapd-2.45.2/cmd/libsnap-confine-private/snap.c:53: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).
	return len == strlen(snap_name)
data/snapd-2.45.2/cmd/libsnap-confine-private/snap.c:116:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(s, instance_name, sizeof(s) - 1);
data/snapd-2.45.2/cmd/libsnap-confine-private/snap.c:288: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).
		snap_name_len = strlen(instance_name);
data/snapd-2.45.2/cmd/libsnap-confine-private/snap.c:292: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).
		instance_key_len = strlen(instance_key_start);
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils.c:33: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).
	size_t alen = strlen(a);
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils.c:34: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).
	size_t blen = strlen(b);
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils.c:49: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).
	size_t xlen = strlen(suffix);
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils.c:50: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).
	size_t slen = strlen(str);
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils.c:65: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).
	size_t xlen = strlen(prefix);
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils.c:66: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).
	size_t slen = strlen(str);
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils.c:82:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(str);
data/snapd-2.45.2/cmd/libsnap-confine-private/string-utils.c:131:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return strlen(dst);
data/snapd-2.45.2/cmd/libsnap-confine-private/tool.c:113: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).
	char xdg_runtime_dir_env[PATH_MAX + strlen("XDG_RUNTIME_DIR=")];
data/snapd-2.45.2/cmd/libsnap-confine-private/tool.c:213: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).
				entry[strlen("SNAPD_DEBUG=x") - 1] =
data/snapd-2.45.2/cmd/libsnap-confine-private/utils.c:135: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 (fwrite(buf, strlen(buf), 1, f) != 1)
data/snapd-2.45.2/cmd/libsnap-confine-private/utils.c:183: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(path) == 0) {
data/snapd-2.45.2/cmd/snap-confine/cookie-support-test.c:60: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).
	n = fwrite(dummy_cookie, 1, strlen(dummy_cookie), f);
data/snapd-2.45.2/cmd/snap-confine/cookie-support-test.c:61: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).
	g_assert_cmpint(n, ==, strlen(dummy_cookie));
data/snapd-2.45.2/cmd/snap-confine/cookie-support-test.c:79: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).
	g_assert_cmpint(strlen(cookie), ==, 44);
data/snapd-2.45.2/cmd/snap-confine/cookie-support.c:59:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t n = read(fd, context_val, sizeof(context_val) - 1);
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:144: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 source_dir_len = strlen(source_dir);
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:180: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(directory_name) > source_dir_len) {
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:471: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(HOST_ARCH_TRIPLET) > 0) &&
data/snapd-2.45.2/cmd/snap-confine/mount-support-nvidia.c:488: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(HOST_ARCH32_TRIPLET) > 0) &&
data/snapd-2.45.2/cmd/snap-confine/mount-support-test.c:37:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t fulllen = strlen(path);
data/snapd-2.45.2/cmd/snap-confine/mount-support-test.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).
	size_t fulllen = strlen(path);
data/snapd-2.45.2/cmd/snap-confine/mount-support.c:606: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).
	size_t dirlen = strlen(dir);
data/snapd-2.45.2/cmd/snap-confine/mount-support.c:607:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t subdirlen = strlen(subdir);
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:744:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(group->pipe_master[0], &command, sizeof command) < 0) {
data/snapd-2.45.2/cmd/snap-confine/ns-support.c:840:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int read_n = read(group->pipe_helper[0], &ack, sizeof ack);
data/snapd-2.45.2/cmd/snap-confine/seccomp-support.c:68:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (path == NULL || strlen(path) == 0 || path[0] != '/') {
data/snapd-2.45.2/cmd/snap-confine/seccomp-support.c:76: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).
	size_t checked_path_size = strlen(path) + 1;
data/snapd-2.45.2/cmd/snap-confine/seccomp-support.c:99: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(checked_path) == 1) {
data/snapd-2.45.2/cmd/snap-confine/snap-confine.c:140:27:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	proc_state->orig_umask = umask(0);
data/snapd-2.45.2/cmd/snap-confine/snap-confine.c:167:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(proc_state->orig_umask);
data/snapd-2.45.2/cmd/snap-confine/snap-device-helper-test.c:65: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).
	for (size_t i = 0; i < strlen(mod_appname); i++) {
data/snapd-2.45.2/cmd/snap-update-ns/bootstrap.c:311:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(s, instance_name, sizeof(s) - 1);
data/snapd-2.45.2/cmd/snap-update-ns/bootstrap.c:398: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).
	    && argv0_suffix_maybe[strlen(".test")] == '\0') {
data/snapd-2.45.2/cmd/snapd-env-generator/main.c:39:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buf, path, sizeof(buf) - 1);

ANALYSIS SUMMARY:

Hits = 311
Lines analyzed = 18433 in approximately 1.06 seconds (17361 lines/second)
Physical Source Lines of Code (SLOC) = 11631
Hits@level = [0] 159 [1]  46 [2] 199 [3]  12 [4]  43 [5]  11
Hits@level+ = [0+] 470 [1+] 311 [2+] 265 [3+]  66 [4+]  54 [5+]  11
Hits/KSLOC@level+ = [0+] 40.4093 [1+] 26.7389 [2+] 22.7839 [3+] 5.67449 [4+] 4.64277 [5+] 0.945748
Symlinks skipped = 26 (--allowlink overrides but see doc for security issue)
Dot directories skipped = 2 (--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.