summaryrefslogtreecommitdiff
path: root/atspi/atspi-event-listener.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2021-12-14 13:56:40 -0600
committerFederico Mena Quintero <federico@gnome.org>2021-12-14 13:56:40 -0600
commit7533f8591245bbe4d49fd731ca5cfaf94736939a (patch)
tree506b0d695c768acc7a47f72b997f20e84ece4b31 /atspi/atspi-event-listener.c
parent74c8498deda75f3e1c1ead8977eb85f15fb350b8 (diff)
downloadat-spi2-core-7533f8591245bbe4d49fd731ca5cfaf94736939a.tar.gz
_atspi_dbus_handle_event(): return early if the category or interface name is NULL
I don't know why the interface would be NULL, but dbus_message_get_interface() can return that. We return DBUS_HANDLER_RESULT_NOT_YET_HANDLED in the same way as the other error case, but note that the caller of this function ignores the return value.
Diffstat (limited to 'atspi/atspi-event-listener.c')
-rw-r--r--atspi/atspi-event-listener.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/atspi/atspi-event-listener.c b/atspi/atspi-event-listener.c
index 5455b589..b5d7fe4e 100644
--- a/atspi/atspi-event-listener.c
+++ b/atspi/atspi-event-listener.c
@@ -1000,6 +1000,13 @@ _atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data)
}
category++;
}
+ else
+ {
+ // TODO: Error
+ // Note that the single caller of this function, process_deferred_message(), ignores the return value.
+ // We should probably free the message if we aren't going to process it after all.
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+ }
dbus_message_iter_get_basic (&iter, &detail);
dbus_message_iter_next (&iter);
dbus_message_iter_get_basic (&iter, &detail1);