path: root/src/lib/ecore_wayland
diff options
authorShinwoo Kim <kimcinoo@gmail.com>2018-04-05 13:18:03 +0900
committerShinwoo Kim <cinoo.kim@samsung.com>2018-04-05 19:40:57 +0900
commit3cd2243028f80960d3fe0b464f84514f609bab51 (patch)
treebecbd133ac970e301e833b6e75f705f886e14d9d /src/lib/ecore_wayland
parentefl selection manager - build again if no wl or no x is enabled (diff)
Fix static analysis result
[Dereference after null check] (1) src/lib/ecore/ecore_main.c - _efl_loop_handler_efl_object_finalize checks if pd->loop_data is NULL. After that, _handler_reset > _handler_clear > _ecore_main_fd_handler_del > _ecore_main_fdh_pool_del is directly dereferencing pd->pool_data. - _efl_loop_handler_efl_object_parent_set checks if pd->loop_data as well. Then it calls _handler_reset as well. (2) src/lib/ecore_wayland/ecore_wl_dnd.c - ecore_wl_dnd_selection_set checks if t - result of wl_array_add - is NULL. And it is dereferecing t directly for wl_data_source_offer. (3) src/lib/elementary/efl_ui_dnd.c - Third parameter const char *data could be NULL. In this case strlen dereferences NULL. The data should be non NULL value. I have checked this with Mr. Thiep Ha. (4) src/lib/evas/canvas/evas_object_inform.c - _efl_canvas_object_efl_gfx_stack_stack_below checks if obj->layer is NULL. So it could call evas_object_inform_call_call_restack which is dereferencing obj->layer directly.
Diffstat (limited to 'src/lib/ecore_wayland')
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_dnd.c b/src/lib/ecore_wayland/ecore_wl_dnd.c
index a7694c1587..48c121ffa6 100644
--- a/src/lib/ecore_wayland/ecore_wl_dnd.c
+++ b/src/lib/ecore_wayland/ecore_wl_dnd.c
@@ -170,8 +170,11 @@ ecore_wl_dnd_selection_set(Ecore_Wl_Input *input, const char **types_offered)
for (type = types_offered; *type; type++)
t = wl_array_add(&input->data_types, sizeof(*t));
- if (t) *t = strdup(*type);
- wl_data_source_offer(input->data_source, *t);
+ if (t)
+ {
+ *t = strdup(*type);
+ wl_data_source_offer(input->data_source, *t);
+ }
/* add a listener for data source events */