From 006a5f2adecdf13a75d1ef6d2fe1d586abbb6f68 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 20 Dec 2017 16:59:42 +0100 Subject: [PATCH] Don't crash when installing bundles that have no embedded URIs Closes: #1268 Approved by: alexlarsson --- common/flatpak-dir.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index 79bc147b..2f3a245a 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -8734,9 +8734,13 @@ origin_remote_matches (OstreeRepo *repo, gboolean real_gpg_verify; /* Must match url */ + if (url == NULL) + return FALSE; + if (!ostree_repo_remote_get_url (repo, remote_name, &real_url, NULL)) return FALSE; - if (strcmp (url, real_url) != 0) + + if (g_strcmp0 (url, real_url) != 0) return FALSE; /* Must be noenumerate */