Re: [E-devel] [EGIT] [core/efl] master 01/01: Fix static analysis result

2018-04-05 Thread cnook
Hello Stefan :-]
Sure why not. I thougth it was one "dereference after null check" problem
like keeping coding rule which could occur in different library parts. But
yes, it would be different.
When I have this kind of issue, I will create separate patches. Thank you
for your updates.

Sincerely,
Shinwoo Kim.

2018. 4. 5. 오후 9:09에 "Stefan Schmidt" 님이 작성:

Hello Shinwoo.


On 04/05/2018 12:42 PM, Shinwoo Kim wrote:
> kimcinoo pushed a commit to branch master.
>
>
http://git.enlightenment.org/core/efl.git/commit/?id=3cd2243028f80960d3fe0b464f84514f609bab51
>
> commit 3cd2243028f80960d3fe0b464f84514f609bab51
> Author: Shinwoo Kim 
> Date:   Thu Apr 5 13:18:03 2018 +0900
>
> 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   | 6 ++
>  src/lib/ecore_wayland/ecore_wl_dnd.c | 7 +--
>  src/lib/elementary/efl_ui_dnd.c  | 1 +
>  src/lib/evas/canvas/evas_object_inform.c | 3 ++-
>  4 files changed, 14 insertions(+), 3 deletions(-)
>

These are 4 different problems you are fixing in 4 different library parts.

It would be appreciated if you could have separate patches for each problem
you are fixing.

regards

Stefan Schmidt
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: Fix static analysis result

2018-04-05 Thread Daniel Kolesa
On Thu, Apr 5, 2018, at 14:09, Stefan Schmidt wrote:
> Hello Shinwoo.
> 
> 
> On 04/05/2018 12:42 PM, Shinwoo Kim wrote:
> > kimcinoo pushed a commit to branch master.
> >
> > http://git.enlightenment.org/core/efl.git/commit/?id=3cd2243028f80960d3fe0b464f84514f609bab51
> >
> > commit 3cd2243028f80960d3fe0b464f84514f609bab51
> > Author: Shinwoo Kim 
> > Date:   Thu Apr 5 13:18:03 2018 +0900
> >
> > 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   | 6 ++
> >  src/lib/ecore_wayland/ecore_wl_dnd.c | 7 +--
> >  src/lib/elementary/efl_ui_dnd.c  | 1 +
> >  src/lib/evas/canvas/evas_object_inform.c | 3 ++-
> >  4 files changed, 14 insertions(+), 3 deletions(-)
> >
> 
> These are 4 different problems you are fixing in 4 different library parts.
> 
> It would be appreciated if you could have separate patches for each 
> problem you are fixing.

Also, please follow the commit message conventions.

D5

> 
> regards
> Stefan Schmidt
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: Fix static analysis result

2018-04-05 Thread Stefan Schmidt
Hello Shinwoo.


On 04/05/2018 12:42 PM, Shinwoo Kim wrote:
> kimcinoo pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=3cd2243028f80960d3fe0b464f84514f609bab51
>
> commit 3cd2243028f80960d3fe0b464f84514f609bab51
> Author: Shinwoo Kim 
> Date:   Thu Apr 5 13:18:03 2018 +0900
>
> 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   | 6 ++
>  src/lib/ecore_wayland/ecore_wl_dnd.c | 7 +--
>  src/lib/elementary/efl_ui_dnd.c  | 1 +
>  src/lib/evas/canvas/evas_object_inform.c | 3 ++-
>  4 files changed, 14 insertions(+), 3 deletions(-)
>

These are 4 different problems you are fixing in 4 different library parts.

It would be appreciated if you could have separate patches for each problem you 
are fixing.

regards
Stefan Schmidt

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel