Re: [Iup-users] CID 210573 (#1 of 1): Dereference after null check (FORWARD_NULL)

2018-01-20 Thread Antonio Scuri
; > Result segmentation fault, rare, but possible. > > Best. > Ranier > > De: Antonio Scuri <antonio.sc...@gmail.com> > Enviado: sexta-feira, 19 de janeiro de 2018 10:54 > Para: IUP discussion list. > Assunto: Re: [Iup-users

Re: [Iup-users] CID 210573 (#1 of 1): Dereference after null check (FORWARD_NULL)

2018-01-19 Thread Ranier VF
at dereferences name. 53 strcat(str, name) Result segmentation fault, rare, but possible. Best. Ranier De: Antonio Scuri <antonio.sc...@gmail.com> Enviado: sexta-feira, 19 de janeiro de 2018 10:54 Para: IUP discussion list. Assunto: Re: [Iup-users] CI

Re: [Iup-users] CID 210573 (#1 of 1): Dereference after null check (FORWARD_NULL)

2018-01-19 Thread Antonio Scuri
No. I didn't change it. The logic is correct. You can not replace call_global_default by default_value. Best, Scuri 2018-01-19 11:15 GMT-02:00 Pete Lomax via Iup-users < iup-users@lists.sourceforge.net>: > On Fri, 19/1/18, Antonio Scuri wrote: > > >then they are

Re: [Iup-users] CID 210573 (#1 of 1): Dereference after null check (FORWARD_NULL)

2018-01-19 Thread Pete Lomax via Iup-users
On Fri, 19/1/18, Antonio Scuri wrote: >then they are equal and not NULL at: >       >     (afunc->call_global_default && > iupGlobalDefaultColorChanged(afunc->default_value))) By that logic you could/should/may as well change it to:     (afunc->default_value &&

Re: [Iup-users] CID 210573 (#1 of 1): Dereference after null check (FORWARD_NULL)

2018-01-19 Thread Antonio Scuri
The first if tests for: (afunc->default_value || afunc->system_default) && So default_value can be NULL if system_default is not. Or they are equal and NOT NULL. The second if tests for: if ((!iupStrEqualNoCase(afunc->default_value, afunc->system_default)) || If they are not equal OR

[Iup-users] CID 210573 (#1 of 1): Dereference after null check (FORWARD_NULL)

2018-01-18 Thread Ranier VF
Hi, Issue found by Coverity Scan. CID 210573 (#1 of 1): Dereference after null check (FORWARD_NULL) var_deref_model: Passing null pointer afunc->default_value to iupGlobalDefaultColorChanged, which dereferences it. --- a\src\iup_classattrib.c Fri Oct 14 13:48:50 2016 +++