geoclue2/0001-service-client-Fix-crash-on-startup.patch
Bastien Nocera 40c7448af3 + geoclue2-2.4.10-1
Update to 2.4.10
2018-05-03 16:52:16 +02:00

39 lines
1.4 KiB
Diff

From 96e7e1a75029844efc6ba72ba2e997c05843d18b Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 3 May 2018 13:07:20 +0200
Subject: [PATCH] service-client: Fix crash on startup
Make sure to not dereference a NULL StartData when geoclue gets started.
https://bugs.freedesktop.org/show_bug.cgi?id=106236
---
src/gclue-service-client.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/gclue-service-client.c b/src/gclue-service-client.c
index b969db6..a5bfa2c 100644
--- a/src/gclue-service-client.c
+++ b/src/gclue-service-client.c
@@ -460,6 +460,8 @@ handle_pending_auth (gpointer user_data)
StartData *data = priv->pending_auth_start_data;
guint32 uid;
+ g_return_val_if_fail (data != NULL, G_SOURCE_REMOVE);
+
uid = gclue_client_info_get_user_id (priv->client_info);
if (priv->agent_proxy == NULL) {
g_dbus_method_invocation_return_error (data->invocation,
@@ -698,7 +700,8 @@ gclue_service_client_set_property (GObject *object,
"g-properties-changed",
G_CALLBACK (on_agent_props_changed),
object);
- handle_pending_auth (client);
+ if (client->priv->pending_auth_start_data != NULL)
+ handle_pending_auth (client);
break;
default:
--
2.17.0