Re: [PATCH 1/3] tools/mount-flatpak: init

Demi Marie Obenour
2025-11-14T19:11:59Z

[-- Attachment #1.1.1: Type: text/plain, Size: 667 bytes --]

On 11/13/25 07:04, Alyssa Ross wrote:
> +int main(int, char **argv)
> +{
> + char *installation_path, *id;
> + int params_dir, source_installation_dir, target_installation_dir,
> + app_commit_dir;
> + struct mount_attr attr = {
> + .attr_clr = MOUNT_ATTR_NOSYMFOLLOW,
> + .attr_set = MOUNT_ATTR_RDONLY | MOUNT_ATTR_NODEV,
> + };
> +
> + if (!(installation_path = *++argv))
> + errx(EXIT_FAILURE, "missing installation path");
> + if (!(id = *++argv))
> + errx(EXIT_FAILURE, "missing app ID");

Missing check for argc == 0. I think Linux doesn't allow that nowadays,
but it's best to check.
--
Sincerely,
Demi Marie Obenour (she/her/hers)

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]