From 4e97018bc672ec98134a4ec2d9dacbdd29091d05 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 13 Sep 2017 12:11:51 +0200 Subject: [PATCH] Properly check the tmp dir mode This was using a boolean && instead of a bitwise mask. Reported by covertity. --- common/flatpak-dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index d756b802..fc8ce715 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -639,7 +639,7 @@ flatpak_ensure_system_user_cache_dir_location (GError **error) /* Must be owned by us */ st_buf.st_uid == getuid () && /* and not writeable by others */ - (st_buf.st_mode && 0022) != 0) + (st_buf.st_mode & 0022) != 0) return g_file_new_for_path (path); path = g_strdup ("/var/tmp/flatpak-cache-XXXXXX");