[at-spi2-core: 22/32] _atspi_dbus_handle_event(): return early if the category or interface name is NULL




commit 7533f8591245bbe4d49fd731ca5cfaf94736939a
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Dec 14 13:56:40 2021 -0600

    _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.

 atspi/atspi-event-listener.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]