elm: use Dbus securely
authorShinwoo Kim <cinoo.kim@samsung.com>
Fri, 2 Feb 2018 09:56:58 +0000 (18:56 +0900)
committerJiyoun Park <jy0703.park@samsung.com>
Tue, 3 Apr 2018 15:26:01 +0000 (00:26 +0900)
The Efl.Access.Attribute is using key and value.
The value could be NULL. If the value is NULL, then following error occurs.

*error:
arguments to dbus_message_iter_append_basic() were incorrect,
assertion "_dbus_check_is_valid_utf8 (*string_p)" failed
in file ../../dbus/dbus-message.c line 2712.
This is normally a bug in some application using the D-Bus library.
Array or variant type requires that type string be written, but end_dict_entry
was written.
The overall signature expected here was 'a{ss}' and we are on byte 3 of that
signature.

src/lib/elementary/elm_atspi_bridge.c

index eddafc8..495f06f 100644 (file)
@@ -727,6 +727,7 @@ _accessible_attributes_get(const Eldbus_Service_Interface *iface, const Eldbus_M
      {
         iter_entry = eldbus_message_iter_container_new(iter_dict, 'e', NULL);
         if (!iter_entry) goto error;
+fprintf(stderr, "key: %s, value: %s\n", attr->key, attr->value);
         eldbus_message_iter_arguments_append(iter_entry, "ss", attr->key, attr->value);
         eldbus_message_iter_container_close(iter_dict, iter_entry);
      }