Re: [Iup-users] IUP-TRUNK dereference null return (src\iup_layoutdlg.c)

2020-01-15 Thread Antonio Scuri
Yes, it will always return non NULL in that context. Best, Scuri Em qua, 15 de jan de 2020 18:14, Ranier Vilela escreveu: > Hi Scuri, > > I did not understand your answer, for me still with error. > Do you mean that IupGetCallback (tree, "SELECTION_CB"); > always return different than NULL

Re: [Iup-users] IUP-TRUNK dereference null return (src\iup_layoutdlg.c)

2020-01-15 Thread Ranier Vilela
Hi Scuri, I did not understand your answer, for me still with error. Do you mean that IupGetCallback (tree, "SELECTION_CB"); always return different than NULL in that context? regards, Ranier Vilela De: Antonio Scuri Enviado: quarta-feira, 15 de janeiro

Re: [Iup-users] IUP-TRUNK dereference null return (src\iup_layoutdlg.c)

2020-01-15 Thread Antonio Scuri
Hi, It is true, but not in that context. There SELECTION_CB must be defined. Best, Scuri Em qua., 15 de jan. de 2020 às 09:39, Ranier Vilela escreveu: > Hi, > > IupGetCallback function can return NULL, therefore it is necessary to > check the return. > > best regards, > Ranier

Re: [Iup-users] IUP-TRUNK dereference after null check (src\iup_export.c)

2020-01-15 Thread Antonio Scuri
Hi, the bug was actually here: if (fprintf(file, "function load_image_%s()\n", name) < 0) fprintf should not be called, replaced by iImagePrint Thanks for reporting. Best, Scuri Em qua., 15 de jan. de 2020 às 09:43, Ranier Vilela escreveu: > Hi, > > The var file is not properly

Re: [Iup-users] IUP-TRUNK Use After Free (win\iupwin_image.c 887 line)

2020-01-15 Thread Antonio Scuri
Hi, Thanks, but this is an internal callback used only for memory monitoring. It is actually supposed to be called after the handle has been released. Added a few comments. Best, Scuri Em qua., 15 de jan. de 2020 às 08:47, Ranier Vilela escreveu: > Hi, > win\iupwin_image.c (line 887) > >

Re: [Iup-users] IUP TRUNK msvc 2010, link errors

2020-01-15 Thread Antonio Scuri
Hi, Maybe your clean all left something behind. I just rebuild the dll10 and it linked ok. Best, Scuri Em qua., 15 de jan. de 2020 às 08:09, Ranier Vilela escreveu: > Hi, > After clean all. The msvc claims this: > > ll10/iupwin_val.obj ../obj/dll10/iupwin_touch.obj >

[Iup-users] IUP-TRUNK dereference after null check (src\iup_export.c)

2020-01-15 Thread Ranier Vilela
Hi, The var file is not properly protected, when call fprintf, and can be NULL. "passing null pointer file to fprintf" message from static tool analyser. best regards, Ranier Vilela iup_export.patch Description: iup_export.patch ___ Iup-users mailing

[Iup-users] IUP-TRUNK dereference null return (src\iup_layoutdlg.c)

2020-01-15 Thread Ranier Vilela
Hi, IupGetCallback function can return NULL, therefore it is necessary to check the return. best regards, Ranier Vilela iup_layoutdlg.patch Description: iup_layoutdlg.patch ___ Iup-users mailing list Iup-users@lists.sourceforge.net

[Iup-users] IUP-TRUNK Use After Free (win\iupwin_image.c 887 line)

2020-01-15 Thread Ranier Vilela
Hi, win\iupwin_image.c (line 887) handle is freed at line 872, and is passed to function cb if has IMAGEDESTROY_CB. function cb they have no way of knowing that the pointer is invalid! Wouldn't it be better to call cb first, and then release the pointer? regards, Ranier Vilela

Re: [Iup-users] IUP TRUNK msvc 2010, link errors

2020-01-15 Thread Ranier Vilela
Hi, After clean all. The msvc claims this: ll10/iupwin_val.obj ../obj/dll10/iupwin_touch.obj ../obj/dll10/iupwin_tabs.obj . ./obj/dll10/iupwin_menu.obj ../obj/dll10/iupwin_list.obj ../obj/dll10/iupwin_tre e.obj ../obj/dll10/iupwin_calendar.obj ../obj/dll10/iupwin_datepick.obj ../obj/d

[Iup-users] IUP TRUNK msvc 2010, link errors

2020-01-15 Thread Ranier Vilela
Hi Scuri, I am compiling iup trunk with msvc 2010, and are reporting the error below, could you help? ll10/draw.obj ../obj/dll10/fill.obj ../obj/dll10/font.obj ../obj/dll10/image.obj ../obj/dll10/init.obj ../obj/dll10/memstream.obj ../obj/dll10/misc.obj ../obj/d ll10/path.obj