That won't be ok. Because there maybe dialogs ready to be destroyed after
i>idlg_count.

  The code is protected by the iupObjectCheck call. It may read from an
invalid memory, but it will correctly check the pointer.

Best,
Scuri


Em seg., 4 de nov. de 2019 às 14:08, Ranier VF <ranier_...@hotmail.com>
escreveu:

> Hi,
> Dereferencing a potential null pointer (ih_array), lines 122, 116.
>
> --- \dll\iup\a\src\iup_dlglist.c        Thu Jul 25 16:27:06 2019
> +++ iup_dlglist.c       Mon Nov 04 13:47:53 2019
> @@ -115,7 +115,7 @@
>    int i = 0, count;
>    Ihandle** ih_array = (Ihandle**)malloc(idlg_count * sizeof(Ihandle*));
>    Idiallst *list;
> -  for (list = idlglist; list; list = list->next)
> +  for (list = idlglist; list && i < idlg_count; list = list->next)
>    {
>      if (iupObjectCheck(list->ih))
>      {
>
> Thanks.
> Ranier Vilela_______________________________________________
> Iup-users mailing list
> Iup-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to