|
|
6ac214 |
From 98dbef8b5a547d3d920d377022e20d2e63519b2f Mon Sep 17 00:00:00 2001
|
|
|
6ac214 |
From: Milan Crha <mcrha@redhat.com>
|
|
|
6ac214 |
Date: Tue, 16 Feb 2021 12:58:19 +0100
|
|
|
6ac214 |
Subject: [PATCH 1/2] GsApplication: Crash when run as root
|
|
|
6ac214 |
|
|
|
6ac214 |
The `search_provider` is not initialized in this case, leading
|
|
|
6ac214 |
to NULL dereference. Skip the call in such cases, because the search
|
|
|
6ac214 |
provider is not that important.
|
|
|
6ac214 |
|
|
|
6ac214 |
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1142
|
|
|
6ac214 |
---
|
|
|
6ac214 |
src/gs-application.c | 3 ++-
|
|
|
6ac214 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
6ac214 |
|
|
|
6ac214 |
diff --git a/src/gs-application.c b/src/gs-application.c
|
|
|
6ac214 |
index 48f0c6aac..fdb5f55c4 100644
|
|
|
6ac214 |
--- a/src/gs-application.c
|
|
|
6ac214 |
+++ b/src/gs-application.c
|
|
|
6ac214 |
@@ -912,7 +912,8 @@ static void
|
|
|
6ac214 |
gs_application_setup_search_provider (GsApplication *app)
|
|
|
6ac214 |
{
|
|
|
6ac214 |
gs_application_initialize_plugins (app);
|
|
|
6ac214 |
- gs_shell_search_provider_setup (app->search_provider, app->plugin_loader);
|
|
|
6ac214 |
+ if (app->search_provider)
|
|
|
6ac214 |
+ gs_shell_search_provider_setup (app->search_provider, app->plugin_loader);
|
|
|
6ac214 |
}
|
|
|
6ac214 |
|
|
|
6ac214 |
static void
|
|
|
6ac214 |
--
|
|
|
6ac214 |
GitLab
|
|
|
6ac214 |
|
|
|
6ac214 |
|
|
|
6ac214 |
From 0055bfa8535bb7c5ccd9ace244d71b2885a47daa Mon Sep 17 00:00:00 2001
|
|
|
6ac214 |
From: Philip Withnall <philip@tecnocode.co.uk>
|
|
|
6ac214 |
Date: Mon, 22 Feb 2021 11:41:05 +0000
|
|
|
6ac214 |
Subject: [PATCH 2/2] Apply 1 suggestion(s) to 1 file(s)
|
|
|
6ac214 |
|
|
|
6ac214 |
---
|
|
|
6ac214 |
src/gs-application.c | 2 +-
|
|
|
6ac214 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
6ac214 |
|
|
|
6ac214 |
diff --git a/src/gs-application.c b/src/gs-application.c
|
|
|
6ac214 |
index fdb5f55c4..f05f6f718 100644
|
|
|
6ac214 |
--- a/src/gs-application.c
|
|
|
6ac214 |
+++ b/src/gs-application.c
|
|
|
6ac214 |
@@ -49,7 +49,7 @@ struct _GsApplication {
|
|
|
6ac214 |
#ifdef HAVE_PACKAGEKIT
|
|
|
6ac214 |
GsDbusHelper *dbus_helper;
|
|
|
6ac214 |
#endif
|
|
|
6ac214 |
- GsShellSearchProvider *search_provider;
|
|
|
6ac214 |
+ GsShellSearchProvider *search_provider; /* (nullable) (owned) */
|
|
|
6ac214 |
GSettings *settings;
|
|
|
6ac214 |
GSimpleActionGroup *action_map;
|
|
|
6ac214 |
guint shell_loaded_handler_id;
|
|
|
6ac214 |
--
|
|
|
6ac214 |
GitLab
|
|
|
6ac214 |
|