kimcinoo pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6f06979cdc28f4e6c29b8e6621f8ff0c285bf5e5

commit 6f06979cdc28f4e6c29b8e6621f8ff0c285bf5e5
Author: Shinwoo Kim <cinoo....@samsung.com>
Date:   Thu Sep 28 20:08:25 2017 +0900

    elementary: atspi - fix dbus abort
    
    This patch set fix following abort occured on dbus side.
    
    (gdb) bt
    0   __GI_raise (sig=sig@entry=6)
    1   __GI_abort ()
    2   _dbus_abort ()
    3   _dbus_warn_check_failed
    4   dbus_message_iter_append_basic
    5   append_basic
    6   eldbus_message_iter_basic_append
    7   _bridge_signal_send
    8   _text_text_removed_send
    9   _bridge_accessible_event_dispatch
    10  _elm_interface_atspi_accessible_event_emit
    11  elm_interface_atspi_accessible_event_emit
    12  _entry_changed_user_signal_cb
    
    (gdb) f 12
    (gdb) p *$1
    $2 = {change = {insert = {content = 0x0, pos = 0, plain_length = 1},
                    del = {content = 0x0, start = 0, end = 1}},
          insert = 0 '\000', merge = 0 '\000'}
    
    The following patch set would fix the root cause of this problem.
    https://phab.enlightenment.org/D5240
---
 src/lib/elementary/elm_atspi_bridge.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/lib/elementary/elm_atspi_bridge.c 
b/src/lib/elementary/elm_atspi_bridge.c
index 09247fdc52..1cb104a23d 100644
--- a/src/lib/elementary/elm_atspi_bridge.c
+++ b/src/lib/elementary/elm_atspi_bridge.c
@@ -4135,6 +4135,12 @@ _text_text_inserted_send(void *data, const Efl_Event 
*event)
    if (!STATE_TYPE_GET(pd->object_broadcast_mask, 
ATSPI_OBJECT_EVENT_TEXT_CHANGED))
      return;
 
+   if (!info->content)
+     {
+        WRN("Try to send signal with NULL value");
+        return;
+     }
+
    _bridge_signal_send(data, event->object, ATSPI_DBUS_INTERFACE_EVENT_OBJECT,
                        &_event_obj_signals[ATSPI_OBJECT_EVENT_TEXT_CHANGED], 
"insert", info->pos, info->len, "s", info->content);
 }
@@ -4149,6 +4155,12 @@ _text_text_removed_send(void *data, const Efl_Event 
*event)
    if (!STATE_TYPE_GET(pd->object_broadcast_mask, 
ATSPI_OBJECT_EVENT_TEXT_CHANGED))
      return;
 
+   if (!info->content)
+     {
+        WRN("Try to send signal with NULL value");
+        return;
+     }
+
    _bridge_signal_send(data, event->object, ATSPI_DBUS_INTERFACE_EVENT_OBJECT,
                        &_event_obj_signals[ATSPI_OBJECT_EVENT_TEXT_CHANGED], 
"delete", info->pos, info->len, "s", info->content);
 }

-- 


Reply via email to