Fix static analysis result
authorShinwoo Kim <kimcinoo@gmail.com>
Thu, 5 Apr 2018 04:18:03 +0000 (13:18 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Tue, 10 Apr 2018 13:25:57 +0000 (22:25 +0900)
commit61d5515ecaeb1131d9cd613d26021c5d6cd488d4
treebe867b8a1804dc8d4ca9be9f77243f856907c86d
parentfe23eeed3592efbd93f4be3cb0c1c6d71b186fe3
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.
src/lib/ecore/ecore_main.c
src/lib/ecore_wayland/ecore_wl_dnd.c
src/lib/elementary/efl_ui_dnd.c
src/lib/evas/canvas/evas_object_inform.c