From 5e6b82550dd2635f9a18eb82ab72fced8e3e3fcc Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Tue, 12 Sep 2017 20:37:56 +0900 Subject: [PATCH] check reply message of "GetNeighbor" The dbus_message_iter_init makes a crash if a message(reply) is NULL. The message(reply) is NULL with following error message. error message: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. Change-Id: I64c9f468f26299af86ee52dff3714b03112d49e3 --- atspi/atspi-accessible.c | 1 + 1 file changed, 1 insertion(+) diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c index 40053f2..752001c 100644 --- a/atspi/atspi-accessible.c +++ b/atspi/atspi-accessible.c @@ -617,6 +617,7 @@ atspi_accessible_get_neighbor (AtspiAccessible *root, const char *path = are_objects_on_the_same_bus(root, start) ? root_path : ""; DBusMessage *reply = _atspi_dbus_call_partial (start, atspi_interface_accessible, "GetNeighbor", error, "sii", path, (int)direction, (int)search_mode); + _ATSPI_DBUS_CHECK_SIG (reply, "(so)y", error, NULL); dbus_message_iter_init (reply, &iter); AtspiAccessible *ret = _atspi_dbus_return_accessible_from_iter (&iter); -- 2.7.4