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/flatpak-1.9.2/app/flatpak-builtins-utils.h Examining data/flatpak-1.9.2/app/flatpak-builtins-utils.c Examining data/flatpak-1.9.2/app/flatpak-table-printer.c Examining data/flatpak-1.9.2/app/flatpak-table-printer.h Examining data/flatpak-1.9.2/app/parse-datetime.h Examining data/flatpak-1.9.2/app/flatpak-main.c Examining data/flatpak-1.9.2/app/flatpak-builtins.h Examining data/flatpak-1.9.2/app/flatpak-builtins-remote-add.c Examining data/flatpak-1.9.2/app/flatpak-builtins-remote-modify.c Examining data/flatpak-1.9.2/app/flatpak-builtins-remote-delete.c Examining data/flatpak-1.9.2/app/flatpak-builtins-remote-list.c Examining data/flatpak-1.9.2/app/flatpak-builtins-remote-ls.c Examining data/flatpak-1.9.2/app/flatpak-builtins-remote-info.c Examining data/flatpak-1.9.2/app/flatpak-builtins-install.c Examining data/flatpak-1.9.2/app/flatpak-builtins-override.c Examining data/flatpak-1.9.2/app/flatpak-builtins-make-current.c Examining data/flatpak-1.9.2/app/flatpak-builtins-update.c Examining data/flatpak-1.9.2/app/flatpak-builtins-uninstall.c Examining data/flatpak-1.9.2/app/flatpak-builtins-mask.c Examining data/flatpak-1.9.2/app/flatpak-builtins-pin.c Examining data/flatpak-1.9.2/app/flatpak-builtins-list.c Examining data/flatpak-1.9.2/app/flatpak-builtins-info.c Examining data/flatpak-1.9.2/app/flatpak-builtins-config.c Examining data/flatpak-1.9.2/app/flatpak-builtins-run.c Examining data/flatpak-1.9.2/app/flatpak-builtins-enter.c Examining data/flatpak-1.9.2/app/flatpak-builtins-ps.c Examining data/flatpak-1.9.2/app/flatpak-builtins-build-init.c Examining data/flatpak-1.9.2/app/flatpak-builtins-build.c Examining data/flatpak-1.9.2/app/flatpak-builtins-build-finish.c Examining data/flatpak-1.9.2/app/flatpak-builtins-build-export.c Examining data/flatpak-1.9.2/app/flatpak-builtins-build-bundle.c Examining data/flatpak-1.9.2/app/flatpak-builtins-build-import-bundle.c Examining data/flatpak-1.9.2/app/flatpak-builtins-build-commit-from.c Examining data/flatpak-1.9.2/app/flatpak-builtins-build-sign.c Examining data/flatpak-1.9.2/app/flatpak-builtins-build-update-repo.c Examining data/flatpak-1.9.2/app/flatpak-builtins-repo.c Examining data/flatpak-1.9.2/app/flatpak-builtins-document-export.c Examining data/flatpak-1.9.2/app/flatpak-builtins-document-unexport.c Examining data/flatpak-1.9.2/app/flatpak-builtins-document-info.c Examining data/flatpak-1.9.2/app/flatpak-builtins-document-list.c Examining data/flatpak-1.9.2/app/flatpak-builtins-permission-remove.c Examining data/flatpak-1.9.2/app/flatpak-builtins-permission-set.c Examining data/flatpak-1.9.2/app/flatpak-builtins-permission-list.c Examining data/flatpak-1.9.2/app/flatpak-builtins-permission-show.c Examining data/flatpak-1.9.2/app/flatpak-builtins-permission-reset.c Examining data/flatpak-1.9.2/app/flatpak-builtins-search.c Examining data/flatpak-1.9.2/app/flatpak-builtins-repair.c Examining data/flatpak-1.9.2/app/flatpak-builtins-create-usb.c Examining data/flatpak-1.9.2/app/flatpak-builtins-kill.c Examining data/flatpak-1.9.2/app/flatpak-builtins-history.c Examining data/flatpak-1.9.2/app/flatpak-complete.c Examining data/flatpak-1.9.2/app/flatpak-complete.h Examining data/flatpak-1.9.2/app/flatpak-cli-transaction.c Examining data/flatpak-1.9.2/app/flatpak-cli-transaction.h Examining data/flatpak-1.9.2/app/flatpak-quiet-transaction.c Examining data/flatpak-1.9.2/app/flatpak-quiet-transaction.h Examining data/flatpak-1.9.2/app/flatpak-polkit-agent-text-listener.h Examining data/flatpak-1.9.2/app/flatpak-polkit-agent-text-listener.c Examining data/flatpak-1.9.2/bubblewrap/bubblewrap.c Examining data/flatpak-1.9.2/bubblewrap/bind-mount.h Examining data/flatpak-1.9.2/bubblewrap/bind-mount.c Examining data/flatpak-1.9.2/bubblewrap/network.h Examining data/flatpak-1.9.2/bubblewrap/network.c Examining data/flatpak-1.9.2/bubblewrap/utils.h Examining data/flatpak-1.9.2/bubblewrap/utils.c Examining data/flatpak-1.9.2/common/flatpak.h Examining data/flatpak-1.9.2/common/flatpak-ref.h Examining data/flatpak-1.9.2/common/flatpak-error.h Examining data/flatpak-1.9.2/common/flatpak-installed-ref.h Examining data/flatpak-1.9.2/common/flatpak-remote-ref.h Examining data/flatpak-1.9.2/common/flatpak-related-ref.h Examining data/flatpak-1.9.2/common/flatpak-bundle-ref.h Examining data/flatpak-1.9.2/common/flatpak-installation.h Examining data/flatpak-1.9.2/common/flatpak-remote.h Examining data/flatpak-1.9.2/common/flatpak-version-macros.h Examining data/flatpak-1.9.2/common/flatpak-portal-error.h Examining data/flatpak-1.9.2/common/flatpak-transaction.h Examining data/flatpak-1.9.2/common/flatpak-instance.h Examining data/flatpak-1.9.2/common/flatpak-utils-base.c Examining data/flatpak-1.9.2/common/flatpak-utils-base-private.h Examining data/flatpak-1.9.2/common/flatpak-appdata-private.h Examining data/flatpak-1.9.2/common/flatpak-appdata.c Examining data/flatpak-1.9.2/common/flatpak-auth-private.h Examining data/flatpak-1.9.2/common/flatpak-auth.c Examining data/flatpak-1.9.2/common/flatpak-bundle-ref.c Examining data/flatpak-1.9.2/common/flatpak-bwrap-private.h Examining data/flatpak-1.9.2/common/flatpak-bwrap.c Examining data/flatpak-1.9.2/common/flatpak-chain-input-stream-private.h Examining data/flatpak-1.9.2/common/flatpak-chain-input-stream.c Examining data/flatpak-1.9.2/common/flatpak-common-types-private.h Examining data/flatpak-1.9.2/common/flatpak-context-private.h Examining data/flatpak-1.9.2/common/flatpak-context.c Examining data/flatpak-1.9.2/common/flatpak-dir-private.h Examining data/flatpak-1.9.2/common/flatpak-dir.c Examining data/flatpak-1.9.2/common/flatpak-error.c Examining data/flatpak-1.9.2/common/flatpak-exports-private.h Examining data/flatpak-1.9.2/common/flatpak-exports.c Examining data/flatpak-1.9.2/common/flatpak-installation-private.h Examining data/flatpak-1.9.2/common/flatpak-installation.c Examining data/flatpak-1.9.2/common/flatpak-installed-ref-private.h Examining data/flatpak-1.9.2/common/flatpak-installed-ref.c Examining data/flatpak-1.9.2/common/flatpak-instance-private.h Examining data/flatpak-1.9.2/common/flatpak-instance.c Examining data/flatpak-1.9.2/common/flatpak-json-oci-private.h Examining data/flatpak-1.9.2/common/flatpak-json-oci.c Examining data/flatpak-1.9.2/common/flatpak-json-private.h Examining data/flatpak-1.9.2/common/flatpak-json.c Examining data/flatpak-1.9.2/common/flatpak-oci-registry-private.h Examining data/flatpak-1.9.2/common/flatpak-oci-registry.c Examining data/flatpak-1.9.2/common/flatpak-portal-error.c Examining data/flatpak-1.9.2/common/flatpak-progress-private.h Examining data/flatpak-1.9.2/common/flatpak-progress.c Examining data/flatpak-1.9.2/common/flatpak-ref.c Examining data/flatpak-1.9.2/common/flatpak-ref-utils-private.h Examining data/flatpak-1.9.2/common/flatpak-ref-utils.c Examining data/flatpak-1.9.2/common/flatpak-related-ref-private.h Examining data/flatpak-1.9.2/common/flatpak-related-ref.c Examining data/flatpak-1.9.2/common/flatpak-remote-private.h Examining data/flatpak-1.9.2/common/flatpak-remote-ref-private.h Examining data/flatpak-1.9.2/common/flatpak-remote-ref.c Examining data/flatpak-1.9.2/common/flatpak-remote.c Examining data/flatpak-1.9.2/common/flatpak-run-private.h Examining data/flatpak-1.9.2/common/flatpak-run.c Examining data/flatpak-1.9.2/common/flatpak-transaction-private.h Examining data/flatpak-1.9.2/common/flatpak-transaction.c Examining data/flatpak-1.9.2/common/flatpak-utils-http-private.h Examining data/flatpak-1.9.2/common/flatpak-utils-http.c Examining data/flatpak-1.9.2/common/flatpak-utils-private.h Examining data/flatpak-1.9.2/common/flatpak-utils.c Examining data/flatpak-1.9.2/common/flatpak-zstd-decompressor.c Examining data/flatpak-1.9.2/common/flatpak-zstd-decompressor-private.h Examining data/flatpak-1.9.2/common/valgrind-private.h Examining data/flatpak-1.9.2/common/flatpak-parental-controls.c Examining data/flatpak-1.9.2/common/flatpak-parental-controls-private.h Examining data/flatpak-1.9.2/common/flatpak.c Examining data/flatpak-1.9.2/common/test-lib.c Examining data/flatpak-1.9.2/dbus-proxy/flatpak-proxy.c Examining data/flatpak-1.9.2/dbus-proxy/flatpak-proxy.h Examining data/flatpak-1.9.2/dbus-proxy/dbus-proxy.c Examining data/flatpak-1.9.2/dbus-proxy/backport-autoptr.h Examining data/flatpak-1.9.2/icon-validator/validate-icon.c Examining data/flatpak-1.9.2/libglnx/tests/libglnx-testlib.h Examining data/flatpak-1.9.2/libglnx/tests/libglnx-testlib.c Examining data/flatpak-1.9.2/libglnx/tests/test-libglnx-errors.c Examining data/flatpak-1.9.2/libglnx/tests/test-libglnx-fdio.c Examining data/flatpak-1.9.2/libglnx/tests/test-libglnx-macros.c Examining data/flatpak-1.9.2/libglnx/tests/test-libglnx-shutil.c Examining data/flatpak-1.9.2/libglnx/tests/test-libglnx-xattrs.c Examining data/flatpak-1.9.2/libglnx/glnx-macros.h Examining data/flatpak-1.9.2/libglnx/glnx-backport-autocleanups.h Examining data/flatpak-1.9.2/libglnx/glnx-backport-autoptr.h Examining data/flatpak-1.9.2/libglnx/glnx-backports.h Examining data/flatpak-1.9.2/libglnx/glnx-backports.c Examining data/flatpak-1.9.2/libglnx/glnx-local-alloc.h Examining data/flatpak-1.9.2/libglnx/glnx-local-alloc.c Examining data/flatpak-1.9.2/libglnx/glnx-errors.h Examining data/flatpak-1.9.2/libglnx/glnx-errors.c Examining data/flatpak-1.9.2/libglnx/glnx-console.h Examining data/flatpak-1.9.2/libglnx/glnx-console.c Examining data/flatpak-1.9.2/libglnx/glnx-dirfd.h Examining data/flatpak-1.9.2/libglnx/glnx-dirfd.c Examining data/flatpak-1.9.2/libglnx/glnx-fdio.h Examining data/flatpak-1.9.2/libglnx/glnx-fdio.c Examining data/flatpak-1.9.2/libglnx/glnx-lockfile.h Examining data/flatpak-1.9.2/libglnx/glnx-lockfile.c Examining data/flatpak-1.9.2/libglnx/glnx-missing-syscall.h Examining data/flatpak-1.9.2/libglnx/glnx-missing.h Examining data/flatpak-1.9.2/libglnx/glnx-xattrs.h Examining data/flatpak-1.9.2/libglnx/glnx-xattrs.c Examining data/flatpak-1.9.2/libglnx/glnx-shutil.h Examining data/flatpak-1.9.2/libglnx/glnx-shutil.c Examining data/flatpak-1.9.2/libglnx/libglnx.h Examining data/flatpak-1.9.2/oci-authenticator/flatpak-oci-authenticator.c Examining data/flatpak-1.9.2/portal/flatpak-portal.c Examining data/flatpak-1.9.2/portal/flatpak-portal.h Examining data/flatpak-1.9.2/portal/flatpak-portal-app-info.c Examining data/flatpak-1.9.2/portal/flatpak-portal-app-info.h Examining data/flatpak-1.9.2/portal/portal-impl.c Examining data/flatpak-1.9.2/portal/portal-impl.h Examining data/flatpak-1.9.2/revokefs/demo.c Examining data/flatpak-1.9.2/revokefs/main.c Examining data/flatpak-1.9.2/revokefs/writer.c Examining data/flatpak-1.9.2/revokefs/writer.h Examining data/flatpak-1.9.2/session-helper/flatpak-session-helper.c Examining data/flatpak-1.9.2/system-helper/flatpak-system-helper.c Examining data/flatpak-1.9.2/tests/test-exports.c Examining data/flatpak-1.9.2/tests/testcommon.c Examining data/flatpak-1.9.2/tests/httpcache.c Examining data/flatpak-1.9.2/tests/list-unused.c Examining data/flatpak-1.9.2/tests/test-authenticator.c Examining data/flatpak-1.9.2/tests/test-portal-impl.c Examining data/flatpak-1.9.2/tests/test-update-portal.c Examining data/flatpak-1.9.2/tests/testlibrary.c FINAL RESULTS: data/flatpak-1.9.2/common/flatpak-dir.c:7784:7: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod (flatpak_file_get_path_cached (extra_files), 0700) != 0) data/flatpak-1.9.2/icon-validator/validate-icon.c:145:18: [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. symlink_size = readlink ("/proc/self/exe", validate_icon, sizeof (validate_icon) - 1); data/flatpak-1.9.2/portal/flatpak-portal.c:637:18: [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. symlink_size = readlink (proc_path, path_buffer, PATH_MAX); data/flatpak-1.9.2/portal/flatpak-portal.c:2776:18: [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. exe_path_len = readlink ("/proc/self/exe", exe_path, sizeof (exe_path) - 1); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1743:11: [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 (src_dir, passwd.pw_uid, passwd.pw_gid) == -1) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:2379:18: [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. exe_path_len = readlink ("/proc/self/exe", exe_path, sizeof (exe_path) - 1); data/flatpak-1.9.2/app/flatpak-polkit-agent-text-listener.c:172:5: [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 (listener->tty, FLATPAK_ANSI_RED); data/flatpak-1.9.2/app/flatpak-polkit-agent-text-listener.c:180:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (listener->tty, FLATPAK_ANSI_COLOR_RESET FLATPAK_ANSI_ALT_SCREEN_OFF); data/flatpak-1.9.2/app/flatpak-polkit-agent-text-listener.c:414:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (listener->tty, FLATPAK_ANSI_ALT_SCREEN_ON FLATPAK_ANSI_RED); data/flatpak-1.9.2/app/flatpak-polkit-agent-text-listener.c:420:5: [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 (listener->tty, FLATPAK_ANSI_COLOR_RESET); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:974:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ((char *) buffer + arg1_offset, arg1); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:976:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy ((char *) buffer + arg2_offset, arg2); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:1148:19: [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 (subdir, W_OK) < 0) data/flatpak-1.9.2/bubblewrap/bubblewrap.c:2913:7: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (execvp (argv[0], argv) == -1) data/flatpak-1.9.2/bubblewrap/utils.c:38: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, format, args); data/flatpak-1.9.2/bubblewrap/utils.c:54: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, format, args); data/flatpak-1.9.2/bubblewrap/utils.c:262:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (res, s1); data/flatpak-1.9.2/bubblewrap/utils.c:264:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (res, s2); data/flatpak-1.9.2/bubblewrap/utils.c:287:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (res, s1); data/flatpak-1.9.2/bubblewrap/utils.c:289:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (res, s2); data/flatpak-1.9.2/bubblewrap/utils.c:291:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (res, s3); data/flatpak-1.9.2/bubblewrap/utils.h:34:22: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define __debug__(x) printf x data/flatpak-1.9.2/bubblewrap/utils.h:51:81: [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__)) __attribute__((format (printf, 1, 2))); data/flatpak-1.9.2/bubblewrap/utils.h:53:70: [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__)) __attribute__((format (printf, 1, 2))); data/flatpak-1.9.2/bubblewrap/utils.h:75:47: [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/flatpak-1.9.2/common/flatpak-ref-utils.c:707:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (inline_data, ref); data/flatpak-1.9.2/common/flatpak-run.c:2652:16: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. {SCMP_SYS (syslog)}, data/flatpak-1.9.2/portal/flatpak-portal.c:721: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 (proc_path, read_access_mode) != 0) data/flatpak-1.9.2/portal/flatpak-portal.c:724: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 (proc_path, W_OK) == 0) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:240:31: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. flatpak_dir_set_source_pid (system, source_pid); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:241:37: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. flatpak_dir_set_no_system_helper (system, TRUE); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:243:10: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. return system; data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:475:45: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. deploy_dir = flatpak_dir_get_if_deployed (system, ref, NULL, NULL); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:481:45: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. real_origin = flatpak_dir_get_origin (system, ref, NULL, NULL); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:490:33: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_ensure_repo (system, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:496:40: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. is_oci = flatpak_dir_get_remote_oci (system, arg_origin); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:504:44: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_delete_mirror_refs (system, FALSE, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:526:57: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ostree_repo_remote_get_url (flatpak_dir_get_repo (system), data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:582:45: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. state = flatpak_dir_get_remote_state (system, arg_origin, FALSE, NULL, &error); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:593:46: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_list_all_remote_refs (system, state, &remote_refs, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:616:63: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. checksum = flatpak_pull_from_oci (flatpak_dir_get_repo (system), registry, NULL, desc->parent.digest, NULL, FLATPAK_OCI_MANIFEST (versioned), image_config, data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:627:46: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_pull_untrusted_local (system, arg_repo_path, data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:640:62: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!ostree_repo_remote_get_url (flatpak_dir_get_repo (system), data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:656:54: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. state = flatpak_dir_get_remote_state_optional (system, arg_origin, FALSE, NULL, &error); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:663:30: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_pull (system, state, arg_ref, NULL, (const char **) arg_subpaths, NULL, NULL, NULL, NULL, data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:676:43: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_deploy_update (system, ref, NULL, data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:687:44: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_deploy_install (system, ref, arg_origin, data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:793:33: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_ensure_repo (system, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:800:40: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. is_oci = flatpak_dir_get_remote_oci (system, arg_origin); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:802:43: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. subset = flatpak_dir_get_remote_subset (system, arg_origin); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:825:42: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_update_appstream (system, data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:845:46: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_pull_untrusted_local (system, arg_repo_path, data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:852:50: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_pull_untrusted_local (system, arg_repo_path, data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:874:62: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!ostree_repo_remote_get_url (flatpak_dir_get_repo (system), data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:890:54: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. state = flatpak_dir_get_remote_state_optional (system, arg_origin, FALSE, NULL, &error); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:897:30: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_pull (system, state, new_branch, NULL, NULL, NULL, NULL, NULL, NULL, data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:901:34: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_pull (system, state, old_branch, NULL, NULL, NULL, NULL, NULL, NULL, data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:914:38: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_deploy_appstream (system, data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:964:33: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_ensure_repo (system, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:970:31: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_uninstall (system, ref, arg_flags, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1017:36: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_install_bundle (system, bundle_file, arg_remote, &ref, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1076:33: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_ensure_repo (system, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1089:39: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_modify_remote (system, arg_remote, config, gpg_data, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1097:39: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_remove_remote (system, force_remove, arg_remote, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1149:33: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_ensure_repo (system, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1155:32: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_set_config (system, arg_key, arg_value, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1227:53: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. state = flatpak_dir_get_remote_state_for_index (system, arg_remote, summary_bytes, summary_sig_bytes, NULL, &error); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1229:55: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. state = flatpak_dir_get_remote_state_for_summary (system, arg_remote, summary_bytes, summary_sig_bytes, NULL, &error); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1243:59: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_update_remote_configuration_for_state (system, state, FALSE, NULL, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1288:33: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_ensure_repo (system, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1294:32: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_remove_ref (system, arg_remote, arg_ref, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1330:33: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_ensure_repo (system, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1336:27: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_prune (system, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1374:33: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_ensure_repo (system, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1380:36: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_migrate_config (system, NULL, NULL, &local_error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1413:33: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_ensure_repo (system, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1419:34: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_run_triggers (system, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1721:56: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. flatpak_dir = g_file_get_path (flatpak_dir_get_path (system)); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1801:33: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_ensure_repo (system, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1807:36: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_update_summary (system, delete_summary, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1849:33: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_ensure_repo (system, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1856:40: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. is_oci = flatpak_dir_get_remote_oci (system, arg_origin); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1864:45: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!flatpak_dir_remote_make_oci_summary (system, arg_origin, only_cached, NULL, NULL, &error)) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1973:51: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. is_install = !dir_ref_is_installed (system, ref); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:2073:54: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. deploy_data = flatpak_dir_get_deploy_data (system, ref, FLATPAK_DEPLOY_VERSION_CURRENT, NULL, NULL); data/flatpak-1.9.2/tests/testlibrary.c:2348:26: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. gboolean system) data/flatpak-1.9.2/tests/testlibrary.c:2364:13: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. argv[2] = system ? "--system" : "--user"; data/flatpak-1.9.2/tests/testlibrary.c:2389:29: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. gboolean system) data/flatpak-1.9.2/tests/testlibrary.c:2395:13: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. argv[2] = system ? "--system" : "--user"; data/flatpak-1.9.2/app/flatpak-builtins-enter.c:231:7: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. if (chroot (root_link)) data/flatpak-1.9.2/app/flatpak-builtins-uninstall.c:125:45: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. g_autofree char *path = g_build_filename (g_get_home_dir (), ".var", "app", app_id, NULL); data/flatpak-1.9.2/app/flatpak-builtins-uninstall.c:414:49: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. g_autofree char *path = g_build_filename (g_get_home_dir (), ".var", "app", NULL); data/flatpak-1.9.2/bubblewrap/bind-mount.c:398:19: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. resolved_dest = realpath (dest, NULL); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:1369:24: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. op->source = realpath (old_source, NULL); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:2824: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 *home = getenv ("HOME"); data/flatpak-1.9.2/common/flatpak-bwrap.c:267:40: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. g_autofree char *dest_dirname_real = realpath (dest_dirname, NULL); data/flatpak-1.9.2/common/flatpak-context.c:2189:75: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. flatpak_exports_add_path_expose (exports, MAX (home_mode, fs_mode), g_get_home_dir ()); data/flatpak-1.9.2/common/flatpak-context.c:2216:29: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (strcmp (path, g_get_home_dir ()) == 0) data/flatpak-1.9.2/common/flatpak-context.c:2243:36: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. path = g_build_filename (g_get_home_dir (), filesystem + 2, NULL); data/flatpak-1.9.2/common/flatpak-context.c:2348:52: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. g_autofree char *src = g_build_filename (g_get_home_dir (), ".var/app", app_id, persist, NULL); data/flatpak-1.9.2/common/flatpak-context.c:2349:53: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. g_autofree char *dest = g_build_filename (g_get_home_dir (), persist, NULL); data/flatpak-1.9.2/common/flatpak-context.c:2378:42: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. flatpak_exports_add_path_dir (exports, g_get_home_dir ()); data/flatpak-1.9.2/common/flatpak-dir.c:6546:38: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. g_autofree char *basedir = realpath (basedir_orig, NULL); data/flatpak-1.9.2/common/flatpak-oci-registry.c:2565:44: [3] (buffer) g_get_tmp_dir: This function is synonymous with 'getenv("TMP")';it returns untrustable input if the environment can beset by an attacker. It 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. tmp_home_dir_pattern = g_build_filename (g_get_tmp_dir (), "flatpak-gpg-XXXXXX", NULL); data/flatpak-1.9.2/common/flatpak-run.c:403:40: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. cups_config_path = g_build_filename (g_get_home_dir (), ".cups/client.conf", NULL); data/flatpak-1.9.2/common/flatpak-run.c:1288:43: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. g_autofree char *real_dev_shm = realpath ("/dev/shm", NULL); data/flatpak-1.9.2/common/flatpak-run.c:1579:48: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. g_autoptr(GFile) home = g_file_new_for_path (g_get_home_dir ()); data/flatpak-1.9.2/common/flatpak-run.c:1801:38: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. path_build_tmp = g_build_filename (g_get_home_dir (), ".fonts", NULL); data/flatpak-1.9.2/common/flatpak-run.c:1921:44: [3] (random) g_random_int: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. instance_id = g_strdup_printf ("%u", g_random_int ()); data/flatpak-1.9.2/common/flatpak-run.c:2153:36: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. filename = g_build_filename (g_get_home_dir (), data/flatpak-1.9.2/common/flatpak-run.c:2900:38: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. g_get_home_dir (), data/flatpak-1.9.2/common/flatpak-utils-base.c:48: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. tzdir = getenv ("TZDIR"); data/flatpak-1.9.2/common/flatpak-utils.c:285:10: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. return realpath (g_get_user_runtime_dir (), NULL); data/flatpak-1.9.2/libglnx/glnx-dirfd.c:275:25: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. XXXXXX[i] = letters[g_random_int_range(0, NLETTERS)]; data/flatpak-1.9.2/libglnx/glnx-dirfd.c:363:45: [3] (buffer) g_get_tmp_dir: This function is synonymous with 'getenv("TMP")';it returns untrustable input if the environment can beset by an attacker. It 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. g_autofree char *path = g_build_filename (g_get_tmp_dir (), tmpl, NULL); data/flatpak-1.9.2/libglnx/glnx-fdio.c:318:44: [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. getenv("TMPDIR") ?: "/var/tmp", data/flatpak-1.9.2/libglnx/tests/test-libglnx-xattrs.c:44:32: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. const guint8 randxattrbyte = g_random_int_range (0, 256); data/flatpak-1.9.2/libglnx/tests/test-libglnx-xattrs.c:45:39: [3] (random) g_random_int: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. const guint32 randxattrvalue_len = (g_random_int () % 256) + 1; /* Picked to be not too small or large */ data/flatpak-1.9.2/libglnx/tests/test-libglnx-xattrs.c:62:32: [3] (random) g_random_int: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. const guint nattrs = MIN (2, g_random_int () % 16); data/flatpak-1.9.2/libglnx/tests/test-libglnx-xattrs.c:66:33: [3] (random) g_random_int: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. guint32 randxattrname_v = g_random_int (); data/flatpak-1.9.2/libglnx/tests/test-libglnx-xattrs.c:79:21: [3] (random) g_random_int: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. WriteType wtype = g_random_int () % 2; data/flatpak-1.9.2/libglnx/tests/test-libglnx-xattrs.c:83:28: [3] (random) g_random_int: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. guint32 randname_v = g_random_int (); data/flatpak-1.9.2/libglnx/tests/test-libglnx-xattrs.c:232:51: [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. getenv ("TMPDIR") ?: "/var/tmp"); data/flatpak-1.9.2/oci-authenticator/flatpak-oci-authenticator.c:417:52: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. g_autofree char *docker_path = g_build_filename (g_get_home_dir (), ".docker/config.json", NULL); data/flatpak-1.9.2/portal/flatpak-portal.c:1767:36: [3] (random) g_random_int_range: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. token = g_strdup_printf ("%d", g_random_int_range (0, 1000)); data/flatpak-1.9.2/session-helper/flatpak-session-helper.c:566:16: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. char *real = realpath (data->source, NULL); data/flatpak-1.9.2/app/flatpak-builtins-build-commit-from.c:88: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 to_b64[44]; data/flatpak-1.9.2/app/flatpak-builtins-build-commit-from.c:101:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_b64[44]; data/flatpak-1.9.2/app/flatpak-builtins-build-commit-from.c:704:44: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. OstreeCollectionRef ref = { (char *) opt_extra_collection_ids[j], (char *) dst_ref }; data/flatpak-1.9.2/app/flatpak-builtins-build-commit-from.c:711:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *from[2]; data/flatpak-1.9.2/app/flatpak-builtins-build-update-repo.c:122: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 to_b64[44]; data/flatpak-1.9.2/app/flatpak-builtins-build-update-repo.c:135:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_b64[44]; data/flatpak-1.9.2/app/flatpak-builtins-build.c:201: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 pid_str[64]; data/flatpak-1.9.2/app/flatpak-builtins-document-export.c:134: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 (dirname, O_PATH | O_CLOEXEC); data/flatpak-1.9.2/app/flatpak-builtins-document-export.c:136: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 (file, O_PATH | O_CLOEXEC); data/flatpak-1.9.2/app/flatpak-builtins-enter.c:114:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). pid = atoi (pid_s); data/flatpak-1.9.2/app/flatpak-builtins-enter.c:209: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). ns_fd[i] = open (path, O_RDONLY); data/flatpak-1.9.2/app/flatpak-builtins-permission-list.c:62:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *one_id[2]; data/flatpak-1.9.2/app/flatpak-builtins-remote-ls.c:336:38: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. value = g_strdup ((char *) g_hash_table_lookup (names, keys[i])); data/flatpak-1.9.2/app/flatpak-cli-transaction.c:569:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *args[3] = { NULL, url, NULL }; data/flatpak-1.9.2/app/flatpak-complete.c:44: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). f = fopen ("/tmp/flatpak-completion-debug.txt", "a+"); data/flatpak-1.9.2/app/flatpak-complete.c:210:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *cur_parts[4] = { NULL }; data/flatpak-1.9.2/app/flatpak-polkit-agent-text-listener.c:143:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). listener->tty = fopen (tty_name, "r+"); data/flatpak-1.9.2/app/flatpak-polkit-agent-text-listener.c:288:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[2048]; data/flatpak-1.9.2/bubblewrap/bubblewrap.c:370: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 data[2]; data/flatpak-1.9.2/bubblewrap/bubblewrap.c:504: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). int fd = open (lock->path, O_RDONLY | O_CLOEXEC); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:1286:23: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). dest_fd = mkstemp (tempfile); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:1424: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)[rec_len] = 0; data/flatpak-1.9.2/bubblewrap/bubblewrap.c:2376:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). proc_fd = open ("/proc", O_PATH); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:2533:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[1]; data/flatpak-1.9.2/bubblewrap/bubblewrap.c:2735:32: [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). { cleanup_fd int oldrootfd = open ("/", O_DIRECTORY | O_RDONLY); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:2787:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[1]; data/flatpak-1.9.2/bubblewrap/network.c:67:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/flatpak-1.9.2/bubblewrap/network.c:140:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/flatpak-1.9.2/bubblewrap/utils.c:469:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFSIZE]; data/flatpak-1.9.2/bubblewrap/utils.c:504:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). sfd = open (src_path, O_CLOEXEC | O_RDONLY); data/flatpak-1.9.2/bubblewrap/utils.c:693: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/flatpak-1.9.2/bubblewrap/utils.c:697: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 control_buf_snd[control_len_snd]; data/flatpak-1.9.2/bubblewrap/utils.c:735: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 recv_buf[1] = { 0 }; data/flatpak-1.9.2/bubblewrap/utils.c:739: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 control_buf_rcv[control_len_rcv]; data/flatpak-1.9.2/common/flatpak-bwrap-private.h:32:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char *flatpak_bwrap_empty_env[1]; data/flatpak-1.9.2/common/flatpak-context.c:913:57: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. flatpak_context_apply_generic_policy (context, (char *) key, policy_values[i]); data/flatpak-1.9.2/common/flatpak-dir.c:5038:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *revs_to_fetch[2]; data/flatpak-1.9.2/common/flatpak-dir.c:5042:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *refs_to_fetch[2]; data/flatpak-1.9.2/common/flatpak-dir.c:5785:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *refs[2] = { NULL, NULL }; data/flatpak-1.9.2/common/flatpak-dir.c:5786:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *commits[2] = { NULL, NULL }; data/flatpak-1.9.2/common/flatpak-dir.c:10181: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). ref_fd = open (flatpak_file_get_path_cached (reffile), O_RDWR | O_CLOEXEC); data/flatpak-1.9.2/common/flatpak-dir.c:15440: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 message[1024]; data/flatpak-1.9.2/common/flatpak-exports.c:637:20: [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 dir_fd = open (path, O_RDONLY | O_NONBLOCK | O_CLOEXEC | O_DIRECTORY); data/flatpak-1.9.2/common/flatpak-exports.c:701: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). o_path_fd = open (path, O_PATH | O_NOFOLLOW | O_CLOEXEC); data/flatpak-1.9.2/common/flatpak-oci-registry.c:669:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[4096]; data/flatpak-1.9.2/common/flatpak-oci-registry.c:1435:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1] = {0}; data/flatpak-1.9.2/common/flatpak-oci-registry.c:1550:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[16 * 1024]; data/flatpak-1.9.2/common/flatpak-oci-registry.c:1863: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 header[8]; data/flatpak-1.9.2/common/flatpak-oci-registry.c:2524: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[1024]; data/flatpak-1.9.2/common/flatpak-ref-utils.c:882: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 (ref + offset, kind_str, kind_len); data/flatpak-1.9.2/common/flatpak-ref-utils.c:885: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 (ref + offset, "/", 1); data/flatpak-1.9.2/common/flatpak-ref-utils.c:889: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 (ref + offset, opt_id, id_len); data/flatpak-1.9.2/common/flatpak-ref-utils.c:892: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 (ref + offset, "/", 1); data/flatpak-1.9.2/common/flatpak-ref-utils.c:896: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 (ref + offset, opt_arch, arch_len); data/flatpak-1.9.2/common/flatpak-ref-utils.c:899: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 (ref + offset, "/", 1); data/flatpak-1.9.2/common/flatpak-ref-utils.c:903: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 (ref + offset, opt_branch, branch_len); data/flatpak-1.9.2/common/flatpak-run.c:145:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen (filename, "rb"); data/flatpak-1.9.2/common/flatpak-run.c:863: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). app_info_fd = open (app_info_path, O_RDONLY | O_CLOEXEC); data/flatpak-1.9.2/common/flatpak-run.c:1269:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nvidia_dev[14]; /* /dev/nvidia plus up to 2 digits */ data/flatpak-1.9.2/common/flatpak-run.c:1942: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). lock_fd = open (lock_file, O_RDWR | O_CREAT | O_CLOEXEC, 0644); data/flatpak-1.9.2/common/flatpak-run.c:2335: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 (info_path, O_RDONLY); data/flatpak-1.9.2/common/flatpak-run.c:2344:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd2 = open (info_path, O_RDONLY); data/flatpak-1.9.2/common/flatpak-run.c:2374:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd3 = open (bwrapinfo_path, O_RDWR | O_CREAT, 0644); data/flatpak-1.9.2/common/flatpak-run.c:3070: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 (file, O_PATH | O_CLOEXEC); data/flatpak-1.9.2/common/flatpak-run.c:3286: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). ld_so_fd = open (flatpak_file_get_path_cached (ld_so_cache), O_RDONLY); data/flatpak-1.9.2/common/flatpak-run.c:3360: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). ld_so_fd = open (flatpak_file_get_path_cached (ld_so_cache_tmp), O_RDONLY); data/flatpak-1.9.2/common/flatpak-run.c:3496: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). return open (path, O_RDONLY|O_CLOEXEC); data/flatpak-1.9.2/common/flatpak-run.c:3913: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). pidns_fd = open (pidns_path, O_RDONLY|O_CLOEXEC); data/flatpak-1.9.2/common/flatpak-run.c:3955:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pid_str[64]; data/flatpak-1.9.2/common/flatpak-run.c:3981:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pid_str[64]; data/flatpak-1.9.2/common/flatpak-utils-http.c:56:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[16 * 1024]; data/flatpak-1.9.2/common/flatpak-utils-http.c:826:39: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). sync_and_rename_tmpfile (GLnxTmpfile *tmpfile, data/flatpak-1.9.2/common/flatpak-utils-http.c:849:30: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (!glnx_link_tmpfile_at (tmpfile, data/flatpak-1.9.2/common/flatpak-utils.c:171: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[32 * 1024]; data/flatpak-1.9.2/common/flatpak-utils.c:3455: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 to_b64[44]; data/flatpak-1.9.2/common/flatpak-utils.c:3468:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_b64[44]; data/flatpak-1.9.2/common/flatpak-utils.c:6369:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[32 * 1024]; data/flatpak-1.9.2/common/flatpak-utils.c:7267: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[512]; data/flatpak-1.9.2/common/flatpak-utils.c:7302: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[512]; data/flatpak-1.9.2/common/flatpak-utils.c:7341: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[512]; data/flatpak-1.9.2/common/flatpak-utils.c:7400: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[512]; data/flatpak-1.9.2/common/flatpak-utils.c:7520: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[512]; data/flatpak-1.9.2/dbus-proxy/dbus-proxy.c:196:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (*args_i >= args->len || ((char *) g_ptr_array_index (args, *args_i))[0] == '-') data/flatpak-1.9.2/dbus-proxy/dbus-proxy.c:205:33: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (*args_i >= args->len || ((char *) g_ptr_array_index (args, *args_i))[0] == '-') data/flatpak-1.9.2/dbus-proxy/dbus-proxy.c:341:39: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. g_ptr_array_add (args, g_strdup ((char *) argv[i])); data/flatpak-1.9.2/dbus-proxy/flatpak-proxy.c:762:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer->data, old->data, old->size); data/flatpak-1.9.2/dbus-proxy/flatpak-proxy.c:832:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&buffer->data[buffer->pos], extra_bytes, res); data/flatpak-1.9.2/dbus-proxy/flatpak-proxy.c:1549: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 (buffer->data, blob, blob_size); data/flatpak-1.9.2/icon-validator/validate-icon.c:142: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 validate_icon[PATH_MAX + 1]; data/flatpak-1.9.2/libglnx/glnx-console.c:246:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. { const char beginbuf[2] = { 0x1B, 0x38 }; data/flatpak-1.9.2/libglnx/glnx-fdio.c:369:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char proc_fd_path[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(tmpf->fd) + 1]; data/flatpak-1.9.2/libglnx/glnx-fdio.c:457:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char proc_fd_path[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(tmpf->fd) + 1]; data/flatpak-1.9.2/libglnx/glnx-fdio.c:896:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[m]; data/flatpak-1.9.2/libglnx/glnx-macros.h:114:38: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static G_GNUC_UNUSED char _static_assert__macros_need_to_be_extended[20 - sizeof((int[]){__VA_ARGS__})/sizeof(int)]; \ data/flatpak-1.9.2/libglnx/glnx-xattrs.c:259:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/flatpak-1.9.2/libglnx/glnx-xattrs.c:316:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/flatpak-1.9.2/libglnx/glnx-xattrs.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 pathbuf[PATH_MAX]; data/flatpak-1.9.2/libglnx/glnx-xattrs.c:436: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 pathbuf[PATH_MAX]; data/flatpak-1.9.2/libglnx/tests/test-libglnx-errors.c:58: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 (noent_path, O_RDONLY); data/flatpak-1.9.2/libglnx/tests/test-libglnx-errors.c:71: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 (noent_path, O_RDONLY); data/flatpak-1.9.2/libglnx/tests/test-libglnx-errors.c:86: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 (noent_path, O_RDONLY); data/flatpak-1.9.2/libglnx/tests/test-libglnx-errors.c:103: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 (noent_path, O_RDONLY); data/flatpak-1.9.2/libglnx/tests/test-libglnx-errors.c:115: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 (noent_path, O_RDONLY); data/flatpak-1.9.2/oci-authenticator/flatpak-oci-authenticator.c:593:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *for_refs_strv[2] = { NULL, NULL}; data/flatpak-1.9.2/portal/flatpak-portal.c:634: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 path_buffer[PATH_MAX + 1]; data/flatpak-1.9.2/portal/flatpak-portal.c:1916:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *permissions[2]; data/flatpak-1.9.2/revokefs/demo.c:15: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[20]; data/flatpak-1.9.2/revokefs/main.c:227:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. callback_utimens (const char *path, const struct timespec tv[2]) data/flatpak-1.9.2/revokefs/writer.c:515:43: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. request_utimens (int writer_socket, const char *path, const struct timespec tv[2]) data/flatpak-1.9.2/revokefs/writer.h:34:47: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. int request_utimens (int writer_socket, const char *path, const struct timespec tv[2]); data/flatpak-1.9.2/session-helper/flatpak-session-helper.c:748:32: [2] (integer) atol: 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). p11_kit_server_pid = atol (pid); data/flatpak-1.9.2/tests/testcommon.c:1019:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *args[3]; data/flatpak-1.9.2/tests/testlibrary.c:2333:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). httpd_pid = atoi (pid); data/flatpak-1.9.2/app/flatpak-builtins-build-commit-from.c:629:106: [1] (buffer) strlen: Does not handle 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_autofree char *new_id = g_strconcat (opt_endoflife_rebase_new[j], dst_ref_parts[1] + strlen(old_prefix), NULL); data/flatpak-1.9.2/app/flatpak-builtins-build-finish.c:158:61: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name_without_extension = g_strndup (dent->d_name, strlen (dent->d_name) - strlen (allowed_extensions[i])); data/flatpak-1.9.2/app/flatpak-builtins-build-finish.c:158:85: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name_without_extension = g_strndup (dent->d_name, strlen (dent->d_name) - strlen (allowed_extensions[i])); data/flatpak-1.9.2/app/flatpak-builtins-build-finish.c:545:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (elements[0]) > 0) data/flatpak-1.9.2/app/flatpak-builtins-build-finish.c:552:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (elements[3]) > 0) data/flatpak-1.9.2/app/flatpak-builtins-build.c:108:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). extension_name = group_name + strlen (FLATPAK_METADATA_GROUP_PREFIX_EXTENSION); data/flatpak-1.9.2/app/flatpak-builtins-config.c:51:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen (s); data/flatpak-1.9.2/app/flatpak-builtins-config.c:73:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gsize len = strlen (s); data/flatpak-1.9.2/app/flatpak-builtins-config.c:91:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gsize len = strlen (s); data/flatpak-1.9.2/app/flatpak-builtins-enter.c:243:68: [1] (buffer) strlen: Does not handle 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 (e = environment; e < environment + environment_len; e = e + strlen (e) + 1) data/flatpak-1.9.2/app/flatpak-builtins-history.c:95: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). return g_strndup (data + strlen (name) + 1, len - (strlen (name) + 1)); data/flatpak-1.9.2/app/flatpak-builtins-history.c:95:54: [1] (buffer) strlen: Does not handle 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 g_strndup (data + strlen (name) + 1, len - (strlen (name) + 1)); data/flatpak-1.9.2/app/flatpak-builtins-list.c:103: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). gsize id_len = strlen (id); data/flatpak-1.9.2/app/flatpak-builtins-list.c:243:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). latest[MIN (strlen (latest), 12)] = 0; data/flatpak-1.9.2/app/flatpak-builtins-remote-add.c:116:69: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). g_key_file_set_string (config, group, "metalink", opt_url + strlen ("metalink=")); data/flatpak-1.9.2/app/flatpak-builtins-remote-info.c:272: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). len = MAX (len, strlen (_("End-of-life:"))); data/flatpak-1.9.2/app/flatpak-builtins-remote-info.c:274: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). len = MAX (len, strlen (_("End-of-life-rebase:"))); data/flatpak-1.9.2/app/flatpak-builtins-remote-ls.c:337: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). value[MIN (strlen (value), 12)] = 0; data/flatpak-1.9.2/app/flatpak-builtins-remote-modify.c:131:69: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). g_key_file_set_string (config, group, "metalink", opt_url + strlen ("metalink=")); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:891:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (term); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:917: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). len = MAX (len, strlen (columns[i].name)); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:1028:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). q = ret + strlen (ret); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:1202:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (FLATPAK_ANSI_ALT_SCREEN_ON); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:1204:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (FLATPAK_ANSI_ALT_SCREEN_OFF); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:1206:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (FLATPAK_ANSI_HIDE_CURSOR); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:1208:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (FLATPAK_ANSI_SHOW_CURSOR); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:1210:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (FLATPAK_ANSI_BOLD_ON); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:1212:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (FLATPAK_ANSI_BOLD_OFF); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:1214:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (FLATPAK_ANSI_FAINT_ON); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:1216:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (FLATPAK_ANSI_FAINT_OFF); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:1218:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (FLATPAK_ANSI_RED); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:1220:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (FLATPAK_ANSI_GREEN); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:1222:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (FLATPAK_ANSI_COLOR_RESET); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:1224:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (FLATPAK_ANSI_ROW_N); data/flatpak-1.9.2/app/flatpak-builtins-utils.c:1226:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (FLATPAK_ANSI_CLEAR); data/flatpak-1.9.2/app/flatpak-cli-transaction.c:338:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cli->speed_len = MAX (cli->speed_len, strlen (speed) + 2); data/flatpak-1.9.2/app/flatpak-cli-transaction.c:343:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bar_length = MIN (20, cli->table_width - (strlen (cli->progress_msg) + 6 + cli->speed_len)); data/flatpak-1.9.2/app/flatpak-cli-transaction.c:910: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). len = (res->str + strlen (res->str)) - p; data/flatpak-1.9.2/app/flatpak-cli-transaction.c:911:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (len + strlen ((char *) items->pdata[i]) + 2 >= cols) data/flatpak-1.9.2/app/flatpak-cli-transaction.c:989:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). max_permission_width = MAX (max_permission_width, strlen (g_ptr_array_index (permissions, i))); data/flatpak-1.9.2/app/flatpak-cli-transaction.c:1155: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 = MAX (strlen (text1), strlen (text2)); data/flatpak-1.9.2/app/flatpak-cli-transaction.c:1155:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = MAX (strlen (text1), strlen (text2)); data/flatpak-1.9.2/app/flatpak-complete.c:101: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). rest = string + strlen (completion->cur); data/flatpak-1.9.2/app/flatpak-complete.c:103:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). shell_cur_end = shell_cur + strlen (shell_cur); data/flatpak-1.9.2/app/flatpak-complete.c:181:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). str += strlen ("app/"); data/flatpak-1.9.2/app/flatpak-complete.c:183:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). str += strlen ("runtime/"); data/flatpak-1.9.2/app/flatpak-complete.c:281:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). g_string_append (comp, parts[element] + strlen (cur_parts[element])); data/flatpak-1.9.2/app/flatpak-complete.c:306:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). line_part_len = strlen (completion->original_argv[i]); data/flatpak-1.9.2/app/flatpak-complete.c:488: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). list = completion->cur + strlen ("--columns="); data/flatpak-1.9.2/app/flatpak-complete.c:581: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). _point = MIN (_point, strlen (arg_line)); data/flatpak-1.9.2/app/flatpak-main.c:220:71: [1] (buffer) strlen: Does not handle 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_string_append_printf (summary, "%*s%s", (int) (23 - strlen (f_commands->name)), "", _(f_commands->description)); data/flatpak-1.9.2/app/flatpak-main.c:866:3: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(022); data/flatpak-1.9.2/app/flatpak-polkit-agent-text-listener.c:220:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc (listener->tty); data/flatpak-1.9.2/app/flatpak-polkit-agent-text-listener.c:302:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (ppw->pw_gecos == NULL || strlen (ppw->pw_gecos) == 0 || strcmp (ppw->pw_gecos, ppw->pw_name) == 0) data/flatpak-1.9.2/app/flatpak-polkit-agent-text-listener.c:348:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc (listener->tty); data/flatpak-1.9.2/app/flatpak-table-printer.c:365: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). end = row_s->str + strlen (row_s->str); data/flatpak-1.9.2/app/flatpak-table-printer.c:807: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). gsize len = strlen (text); data/flatpak-1.9.2/bubblewrap/bind-mount.c:45: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). end = escaped + strlen (escaped); data/flatpak-1.9.2/bubblewrap/bind-mount.c:106: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). end_token = token + strlen (token); data/flatpak-1.9.2/bubblewrap/bind-mount.c:276: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). next_line = line + strlen (line); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:358: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 (output); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:375:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). s = TEMP_FAILURE_RETRY (read (setup_finished_fd, data, sizeof data)); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:451:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). s = read (event_fd, &val, 8); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:465:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). s = read (signal_fd, &fdsi, sizeof (struct signalfd_siginfo)); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:958: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). buffer_size += strlen (arg1) + 1; data/flatpak-1.9.2/bubblewrap/bubblewrap.c:963: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). buffer_size += strlen (arg2) + 1; data/flatpak-1.9.2/bubblewrap/bubblewrap.c:981:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read (privileged_op_socket, buffer, 1) != 1) data/flatpak-1.9.2/bubblewrap/bubblewrap.c:1049:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (sethostname (arg1, strlen(arg1)) != 0) data/flatpak-1.9.2/bubblewrap/bubblewrap.c:1411:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rec_len = read (read_socket, buffer, buffer_size - 1); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:2534:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void) TEMP_FAILURE_RETRY (read (opt_userns_block_fd, b, 1)); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:2593:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). res = read (child_wait_fd, &val, 8); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:2627:15: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). old_umask = umask (0); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:2788:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void) TEMP_FAILURE_RETRY (read (opt_block_fd, b, 1)); data/flatpak-1.9.2/bubblewrap/bubblewrap.c:2807:3: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask (old_umask); data/flatpak-1.9.2/bubblewrap/utils.c:230:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strncmp (str, prefix, strlen (prefix)) == 0; data/flatpak-1.9.2/bubblewrap/utils.c:255:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen (s1); data/flatpak-1.9.2/bubblewrap/utils.c:257:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen (s2); data/flatpak-1.9.2/bubblewrap/utils.c:278:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen (s1); data/flatpak-1.9.2/bubblewrap/utils.c:280:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen (s2); data/flatpak-1.9.2/bubblewrap/utils.c:282:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen (s3); data/flatpak-1.9.2/bubblewrap/utils.c:409:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). res = write_to_fd (fd, content, strlen (content)); data/flatpak-1.9.2/bubblewrap/utils.c:434:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). res = write_to_fd (fd, content, strlen (content)); data/flatpak-1.9.2/bubblewrap/utils.c:474:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes_read = read (sfd, buffer, BUFSIZE); data/flatpak-1.9.2/bubblewrap/utils.c:552:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). res = read (fd, data + data_read, data_len - data_read - 1); data/flatpak-1.9.2/common/flatpak-auth.c:73: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). key_suffix = key + strlen(FLATPAK_REMOTE_CONFIG_AUTHENTICATOR_OPTIONS_PREFIX); data/flatpak-1.9.2/common/flatpak-bundle-ref.c:329:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (metadata_contents)); data/flatpak-1.9.2/common/flatpak-bwrap.c:295: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). data_len += strlen (bwrap->argv->pdata[i]) + 1; data/flatpak-1.9.2/common/flatpak-context.c:251: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). tmp = g_strndup (name, strlen (name) - 2); data/flatpak-1.9.2/common/flatpak-context.c:546: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). len = strlen (filesystem); data/flatpak-1.9.2/common/flatpak-context.c:579: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). len = strlen (filesystem); data/flatpak-1.9.2/common/flatpak-context.c:789:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove (slash + 1, slash + 2, strlen (slash + 2) + 1); data/flatpak-1.9.2/common/flatpak-context.c:791:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove (slash + 1, slash + 3, strlen (slash + 3) + 1); data/flatpak-1.9.2/common/flatpak-context.c:1585:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). subsystem = group + strlen (FLATPAK_METADATA_GROUP_PREFIX_POLICY); data/flatpak-1.9.2/common/flatpak-dir.c:1494: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 (id) > 80) data/flatpak-1.9.2/common/flatpak-dir.c:1544:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (id); data/flatpak-1.9.2/common/flatpak-dir.c:3718:59: [1] (buffer) strlen: Does not handle 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_autofree char *remote_name = g_strndup (name, strlen (name) - strlen (SYSCONF_REMOTES_FILE_EXT)); data/flatpak-1.9.2/common/flatpak-dir.c:3718:75: [1] (buffer) strlen: Does not handle 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_autofree char *remote_name = g_strndup (name, strlen (name) - strlen (SYSCONF_REMOTES_FILE_EXT)); data/flatpak-1.9.2/common/flatpak-dir.c:5548:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (latest_alt_commit != NULL && strcmp (oci_digest + strlen ("sha256:"), latest_alt_commit) == 0) data/flatpak-1.9.2/common/flatpak-dir.c:6633:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read (fd, buf + bytes_read, size - bytes_read); data/flatpak-1.9.2/common/flatpak-dir.c:6923:63: [1] (buffer) strlen: Does not handle 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_autofree gchar *expected_dbus_name = g_strndup (name, strlen (name) - strlen (".service")); data/flatpak-1.9.2/common/flatpak-dir.c:6923:79: [1] (buffer) strlen: Does not handle 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_autofree gchar *expected_dbus_name = g_strndup (name, strlen (name) - strlen (".service")); data/flatpak-1.9.2/common/flatpak-dir.c:6990:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). new_suffix = name + strlen (app); data/flatpak-1.9.2/common/flatpak-dir.c:7194:61: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name_without_extension = g_strndup (dent->d_name, strlen (dent->d_name) - strlen (allowed_extensions[i])); data/flatpak-1.9.2/common/flatpak-dir.c:7194:85: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name_without_extension = g_strndup (dent->d_name, strlen (dent->d_name) - strlen (allowed_extensions[i])); data/flatpak-1.9.2/common/flatpak-dir.c:8335: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). if (!g_file_replace_contents (wrapper, bin_data, strlen (bin_data), NULL, FALSE, data/flatpak-1.9.2/common/flatpak-dir.c:10148:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (name) == 64) data/flatpak-1.9.2/common/flatpak-dir.c:11112:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). arch_start = dent->d_name + strlen (prefix); data/flatpak-1.9.2/common/flatpak-dir.c:13641:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gsize uri1_len = strlen (uri1); data/flatpak-1.9.2/common/flatpak-dir.c:13642:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gsize uri2_len = strlen (uri2); data/flatpak-1.9.2/common/flatpak-dir.c:13884:65: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). !flatpak_dir_remove_ref (self, remote_name, refspec + strlen (prefix), cancellable, error)) data/flatpak-1.9.2/common/flatpak-dir.c:14066:72: [1] (buffer) strlen: Does not handle 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 (!g_file_replace_contents (filter_copy, backup_data_copy, strlen (backup_data_copy), data/flatpak-1.9.2/common/flatpak-dir.c:14702:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *(tagged_extension = (groups[i] + strlen (FLATPAK_METADATA_GROUP_PREFIX_EXTENSION))) != 0) data/flatpak-1.9.2/common/flatpak-dir.c:14915:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *(tagged_extension = (groups[i] + strlen (FLATPAK_METADATA_GROUP_PREFIX_EXTENSION))) != 0) data/flatpak-1.9.2/common/flatpak-dir.c:15158:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). locale = strv[i] + strlen (categories[j]); data/flatpak-1.9.2/common/flatpak-installation.c:2360:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (res); data/flatpak-1.9.2/common/flatpak-json-oci.c:983: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). key += strlen ("org.flatpak.commit-metadata."); data/flatpak-1.9.2/common/flatpak-json.c:660:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return g_bytes_new_take (str, strlen (str)); data/flatpak-1.9.2/common/flatpak-oci-registry.c:230:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (self->token), data/flatpak-1.9.2/common/flatpak-oci-registry.c:502:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (new_layout_data), data/flatpak-1.9.2/common/flatpak-oci-registry.c:737:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). g_string_append (s, digest + strlen ("sha256:")); data/flatpak-1.9.2/common/flatpak-oci-registry.c:834: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). if (strcmp (checksum, digest + strlen ("sha256:")) != 0) data/flatpak-1.9.2/common/flatpak-oci-registry.c:936:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strcmp (checksum, digest + strlen ("sha256:")) != 0) data/flatpak-1.9.2/common/flatpak-oci-registry.c:989:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (g_ascii_strncasecmp (www_authenticate, "Bearer ", strlen ("Bearer ")) != 0) data/flatpak-1.9.2/common/flatpak-oci-registry.c:995:61: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). params = soup_header_parse_param_list (www_authenticate + strlen ("Bearer ")); data/flatpak-1.9.2/common/flatpak-oci-registry.c:1177:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strcmp (json_checksum, digest + strlen ("sha256:")) != 0) data/flatpak-1.9.2/common/flatpak-oci-registry.c:1568:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes_read = read (data->fd, &data->buffer, sizeof (data->buffer)); data/flatpak-1.9.2/common/flatpak-oci-registry.c:1611:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes_read = read (data->fd, &data->buffer, sizeof (data->buffer)); data/flatpak-1.9.2/common/flatpak-oci-registry.c:2946:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fake_commit = image->digest + strlen ("sha256:"); data/flatpak-1.9.2/common/flatpak-oci-registry.c:3042:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const char *base64_data = icon_data + strlen ("data:image/png;base64,"); data/flatpak-1.9.2/common/flatpak-ref-utils.c:117: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). len = strlen (string); data/flatpak-1.9.2/common/flatpak-ref-utils.c:213: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). rest = string + strlen (name); data/flatpak-1.9.2/common/flatpak-ref-utils.c:234: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). gsize prefix_len = strlen (prefix); data/flatpak-1.9.2/common/flatpak-ref-utils.c:235: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). gsize match_len = strlen (prefix); data/flatpak-1.9.2/common/flatpak-ref-utils.c:306: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). len = strlen (string); data/flatpak-1.9.2/common/flatpak-ref-utils.c:382: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). len = strlen (string); data/flatpak-1.9.2/common/flatpak-ref-utils.c:446: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). suffix_len = strlen (suffix); data/flatpak-1.9.2/common/flatpak-ref-utils.c:459:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). id_len = strlen (id); data/flatpak-1.9.2/common/flatpak-ref-utils.c:475: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). prefix_len = strlen (prefix); data/flatpak-1.9.2/common/flatpak-ref-utils.c:490:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return s + strlen (s); data/flatpak-1.9.2/common/flatpak-ref-utils.c:613:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (ref); data/flatpak-1.9.2/common/flatpak-ref-utils.c:637:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen ("app/"); data/flatpak-1.9.2/common/flatpak-ref-utils.c:639:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen ("runtime/"); data/flatpak-1.9.2/common/flatpak-ref-utils.c:704:59: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). decomposed = g_malloc (sizeof (FlatpakDecomposed) + strlen (ref) + 1); data/flatpak-1.9.2/common/flatpak-ref-utils.c:806:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). kind_len = strlen (kind_str); data/flatpak-1.9.2/common/flatpak-ref-utils.c:811: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). id_len = strlen (opt_id); data/flatpak-1.9.2/common/flatpak-ref-utils.c:829:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). arch_len = strlen (opt_arch); data/flatpak-1.9.2/common/flatpak-ref-utils.c:848: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). branch_len = strlen (opt_branch); data/flatpak-1.9.2/common/flatpak-ref-utils.c:1195:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gssize needle_len = strlen (needle); data/flatpak-1.9.2/common/flatpak-ref-utils.c:1253:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len -= strlen (".Debug"); data/flatpak-1.9.2/common/flatpak-ref-utils.c:1257:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len -= strlen (".Sources"); data/flatpak-1.9.2/common/flatpak-ref-utils.c:1261:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len -= strlen (".Locale"); data/flatpak-1.9.2/common/flatpak-ref-utils.c:1265:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len -= strlen (".Docs"); data/flatpak-1.9.2/common/flatpak-ref-utils.c:1269:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len -= strlen (".BaseApp"); data/flatpak-1.9.2/common/flatpak-ref-utils.c:1273:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len -= strlen (".Platform"); data/flatpak-1.9.2/common/flatpak-ref-utils.c:1277:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len -= strlen (".Sdk"); data/flatpak-1.9.2/common/flatpak-ref-utils.c:1468: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). *out_len = strlen (branch); data/flatpak-1.9.2/common/flatpak-ref-utils.c:1503: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). end = *partial_ref + strlen (*partial_ref); data/flatpak-1.9.2/common/flatpak-ref-utils.c:1553: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). partial_ref += strlen ("app/"); data/flatpak-1.9.2/common/flatpak-ref-utils.c:1558: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). partial_ref += strlen ("runtime/"); data/flatpak-1.9.2/common/flatpak-remote-ref.c:349:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). metadata_bytes = g_bytes_new_take (metadata, strlen (metadata)); data/flatpak-1.9.2/common/flatpak-run.c:93: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). path += strlen ("path="); data/flatpak-1.9.2/common/flatpak-run.c:107:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return au_len == strlen (str) && memcmp (str, au_str, au_len) == 0; data/flatpak-1.9.2/common/flatpak-run.c:995:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read (sync_fds[0], &x, 1) != 1) data/flatpak-1.9.2/common/flatpak-run.c:1636:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). GString * const str = g_string_sized_new (strlen (in)); data/flatpak-1.9.2/common/flatpak-run.c:2390:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gsize instance_id_size = strlen (instance_id); data/flatpak-1.9.2/common/flatpak-run.c:3638:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (custom_runtime_parts[i]) > 0) data/flatpak-1.9.2/common/flatpak-transaction.c:2523:61: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). op->external_metadata = g_bytes_new (external_metadata, strlen (external_metadata) + 1); data/flatpak-1.9.2/common/flatpak-transaction.c:3035:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). metadata_bytes = g_bytes_new (xa_metadata, strlen (xa_metadata) + 1); data/flatpak-1.9.2/common/flatpak-transaction.c:3075:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). metadata_bytes = g_bytes_new (metadata, strlen (metadata) + 1); data/flatpak-1.9.2/common/flatpak-utils-base.c:51:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). canonical_suffix = canonical + strlen (tzdir); data/flatpak-1.9.2/common/flatpak-utils-base.c:60:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). canonical_suffix = canonical + strlen (default_tzdir); data/flatpak-1.9.2/common/flatpak-utils.c:368:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return string + strlen (string); data/flatpak-1.9.2/common/flatpak-utils.c:422: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 (m) == 4 && m[0] == 'i' && m[2] == '8' && m[3] == '6') data/flatpak-1.9.2/common/flatpak-utils.c:800: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). glob += strlen ("app/"); data/flatpak-1.9.2/common/flatpak-utils.c:806:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). glob += strlen ("runtime/"); data/flatpak-1.9.2/common/flatpak-utils.c:1858: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). len = strlen (str); data/flatpak-1.9.2/common/flatpak-utils.c:2140:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). id_suffix = id_start + strlen (parts_prefix); data/flatpak-1.9.2/common/flatpak-utils.c:3547: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). const char *rest = ref + strlen ("appstream2/"); data/flatpak-1.9.2/common/flatpak-utils.c:4622:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strcmp (ext, ".gz") == 0 && strlen (dent->d_name) == 64 + 3) data/flatpak-1.9.2/common/flatpak-utils.c:5023:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). id_text[strlen (id_text) - strlen (".desktop")] = 0; data/flatpak-1.9.2/common/flatpak-utils.c:5023:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). id_text[strlen (id_text) - strlen (".desktop")] = 0; data/flatpak-1.9.2/common/flatpak-utils.c:5262:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). component_id_suffix = component_id_text + strlen (id); /* Don't deref before we check for prefix match! */ data/flatpak-1.9.2/common/flatpak-utils.c:5271:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). component_id_suffix[strlen (component_id_suffix) - strlen (".desktop")] = 0; data/flatpak-1.9.2/common/flatpak-utils.c:5271:64: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). component_id_suffix[strlen (component_id_suffix) - strlen (".desktop")] = 0; data/flatpak-1.9.2/common/flatpak-utils.c:5925:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const char *desktop_name = reason + strlen ("on-xdg-desktop-"); data/flatpak-1.9.2/common/flatpak-utils.c:6015:77: [1] (buffer) strlen: Does not handle 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_autofree char *extended_dir = g_build_filename (directory, id + strlen (prefix), NULL); data/flatpak-1.9.2/common/flatpak-utils.c:6040:95: [1] (buffer) strlen: Does not handle 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_autofree char *extended_dir = g_build_filename (directory, unmaintained_refs[j] + strlen (prefix), NULL); data/flatpak-1.9.2/common/flatpak-utils.c:6106: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). *(extension = (groups[i] + strlen (FLATPAK_METADATA_GROUP_PREFIX_EXTENSION))) != 0) data/flatpak-1.9.2/common/flatpak-utils.c:6928:80: [1] (buffer) strlen: Does not handle 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_variant_new_variant (g_variant_new_string (digest + strlen ("sha256:")))); data/flatpak-1.9.2/common/flatpak-utils.c:6943:82: [1] (buffer) strlen: Does not handle 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_variant_new_variant (g_variant_new_string (diffid + strlen ("sha256:")))); data/flatpak-1.9.2/common/flatpak-utils.c:7081:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strcmp (expected_digest + strlen ("sha256:"), layer_checksum) != 0) data/flatpak-1.9.2/common/flatpak-utils.c:7368:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (default_yes && strlen (buf) == 0) data/flatpak-1.9.2/common/flatpak-utils.c:7423:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (default_yes && strlen (buf) == 0 && data/flatpak-1.9.2/common/flatpak-utils.c:7549:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (default_yes && strlen (buf) == 0 && data/flatpak-1.9.2/common/flatpak-utils.c:7912:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ls = strlen (s); data/flatpak-1.9.2/common/flatpak-utils.c:7915:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lt = strlen (t); data/flatpak-1.9.2/common/flatpak-utils.c:7999:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). write (STDOUT_FILENO, FLATPAK_ANSI_HIDE_CURSOR, strlen (FLATPAK_ANSI_HIDE_CURSOR)); data/flatpak-1.9.2/common/flatpak-utils.c:8005:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). write (STDOUT_FILENO, FLATPAK_ANSI_SHOW_CURSOR, strlen (FLATPAK_ANSI_SHOW_CURSOR)); data/flatpak-1.9.2/dbus-proxy/dbus-proxy.c:70:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes_read = read (fd, buf + buf_size, readlen); data/flatpak-1.9.2/dbus-proxy/dbus-proxy.c:136:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const char *fd_s = arg + strlen ("--fd="); data/flatpak-1.9.2/dbus-proxy/dbus-proxy.c:154:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const char *fd_s = arg + strlen ("--args="); data/flatpak-1.9.2/dbus-proxy/dbus-proxy.c:238:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name[strlen (name) - 2] = 0; data/flatpak-1.9.2/dbus-proxy/dbus-proxy.c:272:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name[strlen (name) - 2] = 0; data/flatpak-1.9.2/dbus-proxy/flatpak-proxy.c:539:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). filter->path[strlen (filter->path) - 2] = 0; data/flatpak-1.9.2/dbus-proxy/flatpak-proxy.c:546: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). method_end = rule + strlen (rule); data/flatpak-1.9.2/dbus-proxy/flatpak-proxy.c:588:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gsize filter_path_len = strlen (filter->path); data/flatpak-1.9.2/dbus-proxy/flatpak-proxy.c:2544:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). next_char = line[strlen (AUTH_BEGIN)]; data/flatpak-1.9.2/dbus-proxy/flatpak-proxy.c:2566:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). AUTH_LINE_SENTINEL, strlen (AUTH_LINE_SENTINEL)); data/flatpak-1.9.2/dbus-proxy/flatpak-proxy.c:2569:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). offset = (line_end + strlen (AUTH_LINE_SENTINEL) - line_start); data/flatpak-1.9.2/libglnx/glnx-console.c:225: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). const guint input_textlen = text ? strlen (text) : 0; data/flatpak-1.9.2/libglnx/glnx-dirfd.c:266: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). const size_t len = strlen (tmpl); data/flatpak-1.9.2/libglnx/glnx-fdio.c:369: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). char proc_fd_path[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(tmpf->fd) + 1]; data/flatpak-1.9.2/libglnx/glnx-fdio.c:457: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). char proc_fd_path[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(tmpf->fd) + 1]; data/flatpak-1.9.2/libglnx/glnx-fdio.c:529:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes_read = read (fd, buf + buf_size, readlen); data/flatpak-1.9.2/libglnx/glnx-fdio.c:898:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = TEMP_FAILURE_RETRY (read (fdf, buf, m)); data/flatpak-1.9.2/libglnx/glnx-fdio.c:1128: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). len = strlen ((char*)buf); data/flatpak-1.9.2/libglnx/glnx-macros.h:54:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _len_ += strlen(_appendees_[_i_]); \ data/flatpak-1.9.2/libglnx/glnx-xattrs.c:57:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (p) + 1; data/flatpak-1.9.2/libglnx/glnx-xattrs.c:87:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (p = xattrs; p < xattrs+len; p = p + strlen (p) + 1) data/flatpak-1.9.2/libglnx/tests/test-libglnx-fdio.c:49:78: [1] (buffer) strlen: Does not handle 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 (!glnx_file_replace_contents_at (srcfd, "foo", (guint8*)"foo contents", strlen ("foo contents"), data/flatpak-1.9.2/libglnx/tests/test-libglnx-fdio.c:52:79: [1] (buffer) strlen: Does not handle 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 (!glnx_file_replace_contents_at (destfd, "bar", (guint8*)"bar contents", strlen ("bar contents"), data/flatpak-1.9.2/libglnx/tests/test-libglnx-fdio.c:124:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (glnx_loop_write (tmpf.fd, "foo", strlen ("foo")) < 0) data/flatpak-1.9.2/libglnx/tests/test-libglnx-fdio.c:143:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (fwrite ("hello", 1, strlen ("hello"), f) != strlen ("hello")) data/flatpak-1.9.2/libglnx/tests/test-libglnx-fdio.c:143:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (fwrite ("hello", 1, strlen ("hello"), f) != strlen ("hello")) data/flatpak-1.9.2/libglnx/tests/test-libglnx-xattrs.c:240:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (fsetxattr (tmpdir.fd, "user.test", "novalue", strlen ("novalue"), 0) < 0) data/flatpak-1.9.2/oci-authenticator/flatpak-oci-authenticator.c:272:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return g_base64_encode ((guchar *)combined, strlen (combined)); data/flatpak-1.9.2/portal/flatpak-portal.c:627: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). path = path + strlen ("/newroot"); data/flatpak-1.9.2/revokefs/writer.c:132: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 path_len = strlen (path); data/flatpak-1.9.2/revokefs/writer.c:173: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 path_len = strlen (path); data/flatpak-1.9.2/revokefs/writer.c:180: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). request.arg1 = strlen(path); data/flatpak-1.9.2/revokefs/writer.c:193:62: [1] (buffer) strlen: Does not handle 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 request_path_data (writer_socket, op, path1, path2, strlen(path2)); data/flatpak-1.9.2/revokefs/writer.c:209: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). end_segment = path + strlen (path); data/flatpak-1.9.2/revokefs/writer.c:800:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size = TEMP_FAILURE_RETRY (read (fuse_socket, request_buffer, sizeof (request_buffer))); data/flatpak-1.9.2/session-helper/flatpak-session-helper.c:742: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). char *pid = line + strlen ("P11_KIT_SERVER_PID="); data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:511: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 (arg_repo_path) > 0 && is_oci) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:609:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strcmp (desc->parent.digest + strlen ("sha256:"), verified_digest) != 0) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:625:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if (strlen (arg_repo_path) > 0) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:782: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 (arg_repo_path) > 0) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:840:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if (strlen (arg_repo_path) > 0) data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:1068:55: [1] (buffer) strlen: Does not handle 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 (!g_key_file_load_from_data (config, arg_config, strlen (arg_config), data/flatpak-1.9.2/system-helper/flatpak-system-helper.c:2321:3: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(022); data/flatpak-1.9.2/tests/test-update-portal.c:426:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read (pipes[0], &c, 1) != 1) data/flatpak-1.9.2/tests/testcommon.c:95:61: [1] (buffer) strlen: Does not handle 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_true (flatpak_is_valid_name ("org.flatpak.test", strlen("org.flatpak.test"), NULL)); data/flatpak-1.9.2/tests/testcommon.c:168:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). g_assert (len == strlen("org.the.runtime")); data/flatpak-1.9.2/tests/testcommon.c:176:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). g_assert (len == strlen ("x86_64")); data/flatpak-1.9.2/tests/testcommon.c:184:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). g_assert (len == strlen ("master")); data/flatpak-1.9.2/tests/testcommon.c:206:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). g_assert (len == strlen ("org.the.app")); data/flatpak-1.9.2/tests/testcommon.c:214:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). g_assert (len == strlen ("x86_64")); data/flatpak-1.9.2/tests/testcommon.c:223:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). g_assert (len == strlen ("master")); data/flatpak-1.9.2/tests/testlibrary.c:820:55: [1] (buffer) strlen: Does not handle 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_autoptr(GBytes) data = g_bytes_new_static (_data, strlen (_data)); data/flatpak-1.9.2/tests/testlibrary.c:2339:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (port[strlen (port) - 1] == '\n') data/flatpak-1.9.2/tests/testlibrary.c:2340:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). port[strlen (port) - 1] = '\0'; data/flatpak-1.9.2/tests/testlibrary.c:3264:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). data = g_bytes_new ("shoobidoo", strlen ("shoobidoo")); data/flatpak-1.9.2/tests/testlibrary.c:3282: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). data = g_bytes_new (s, strlen (s)); data/flatpak-1.9.2/tests/testlibrary.c:3412: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). data = g_bytes_new (s, strlen (s)); data/flatpak-1.9.2/tests/testlibrary.c:4098: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). data = g_bytes_new (s, strlen (s)); data/flatpak-1.9.2/tests/testlibrary.c:4349: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). data = g_bytes_new (s, strlen (s)); ANALYSIS SUMMARY: Hits = 496 Lines analyzed = 123121 in approximately 3.00 seconds (41007 lines/second) Physical Source Lines of Code (SLOC) = 92477 Hits@level = [0] 49 [1] 257 [2] 113 [3] 37 [4] 83 [5] 6 Hits@level+ = [0+] 545 [1+] 496 [2+] 239 [3+] 126 [4+] 89 [5+] 6 Hits/KSLOC@level+ = [0+] 5.89336 [1+] 5.3635 [2+] 2.58443 [3+] 1.3625 [4+] 0.962401 [5+] 0.064881 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.