[gnome-software/1142-gsapplication-crash-when-run-as-root] GsApplication: Crash when run as root
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1142-gsapplication-crash-when-run-as-root] GsApplication: Crash when run as root
- Date: Tue, 16 Feb 2021 12:00:00 +0000 (UTC)
commit 98dbef8b5a547d3d920d377022e20d2e63519b2f
Author: Milan Crha <mcrha redhat com>
Date: Tue Feb 16 12:58:19 2021 +0100
GsApplication: Crash when run as root
The `search_provider` is not initialized in this case, leading
to NULL dereference. Skip the call in such cases, because the search
provider is not that important.
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1142
src/gs-application.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index 48f0c6aac..fdb5f55c4 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -912,7 +912,8 @@ static void
gs_application_setup_search_provider (GsApplication *app)
{
gs_application_initialize_plugins (app);
- gs_shell_search_provider_setup (app->search_provider, app->plugin_loader);
+ if (app->search_provider)
+ gs_shell_search_provider_setup (app->search_provider, app->plugin_loader);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]