diff --git a/0001-lib-Don-t-try-to-use-a-NULL-FlatpakRemoteState.patch b/0001-lib-Don-t-try-to-use-a-NULL-FlatpakRemoteState.patch new file mode 100644 index 0000000..68876c0 --- /dev/null +++ b/0001-lib-Don-t-try-to-use-a-NULL-FlatpakRemoteState.patch @@ -0,0 +1,36 @@ +From 72cad276323914503c3271aa0670d309c1124125 Mon Sep 17 00:00:00 2001 +From: Matthew Leeds +Date: Tue, 1 May 2018 09:18:03 -0700 +Subject: [PATCH] lib: Don't try to use a NULL FlatpakRemoteState + +In flatpak_remote_ref_new(), the state parameter is optional, so check +if it's NULL before trying to use it in +flatpak_remote_state_lookup_sparse_cache(). This prevents a seg fault +when GNOME Software is installing a .flatpakref file. + +Fixes https://github.com/flatpak/flatpak/issues/1632 + +Closes: #1635 +Approved by: pwithnall +--- + lib/flatpak-remote-ref.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/flatpak-remote-ref.c b/lib/flatpak-remote-ref.c +index 0a4c1e4d..3573fa6d 100644 +--- a/lib/flatpak-remote-ref.c ++++ b/lib/flatpak-remote-ref.c +@@ -350,7 +350,9 @@ flatpak_remote_ref_new (FlatpakCollectionRef *coll_ref, + if (metadata) + metadata_bytes = g_bytes_new (metadata, strlen (metadata)); + +- sparse = flatpak_remote_state_lookup_sparse_cache (state, full_ref, NULL); ++ if (state) ++ sparse = flatpak_remote_state_lookup_sparse_cache (state, full_ref, NULL); ++ + if (sparse) + { + g_variant_lookup (sparse, "eol", "&s", &eol); +-- +2.17.0 + diff --git a/flatpak.spec b/flatpak.spec index 3f3d6dd..d43f971 100644 --- a/flatpak.spec +++ b/flatpak.spec @@ -3,13 +3,15 @@ Name: flatpak Version: 0.11.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Application deployment framework for desktop apps License: LGPLv2+ URL: http://flatpak.org/ Source0: https://github.com/flatpak/flatpak/releases/download/%{version}/%{name}-%{version}.tar.xz +Patch0: 0001-lib-Don-t-try-to-use-a-NULL-FlatpakRemoteState.patch + BuildRequires: pkgconfig(appstream-glib) BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.40.0 @@ -148,6 +150,9 @@ flatpak remote-list --system &> /dev/null || : %changelog +* Wed May 02 2018 Kalev Lember - 0.11.5-2 +- Backport a fix for a gnome-software crash installing .flatpakref files + * Mon Apr 30 2018 David King - 0.11.5-1 - Update to 0.11.5