>  Why Coverity claims this?
>  4. access_dbuff_in_call: Calling Polygon indexes array (POINT *)points
with index count.
>  Polygon expect param const POINT *apt;
> and IUP uses array type int?

  Yes, it is.

Best,
Scuri




Em qui., 16 de jul. de 2020 às 15:44, Ranier Vilela <ranier_...@hotmail.com>
escreveu:

> De: Antonio Scuri <antonio.sc...@gmail.com>
> Enviado: quinta-feira, 16 de julho de 2020 18:33
> Para: IUP discussion list.
> Assunto: Re: [Iup-users] IUP assorted issues (part IV)
>
> >> 1. Memory corruption at src/iup_draw.c
> >> variable points has size of 6, but call Polygon with only size 3.
> >> iupdrvDrawPolygon call msvc Polygon function
>
> >   Count is the number of points, not the size of the array.
> Why Coverity claims this?
> 4. access_dbuff_in_call: Calling Polygon indexes array (POINT *)points
> with index count.
>
> See this example:
> http://www.functionx.com/visualc/gdi/polygons.htm
>
> CPoint Pt[7];
>         Pt[0] = CPoint(20, 50);
>         Pt[1] = CPoint(180, 50);
>         Pt[2] = CPoint(180, 20);
>         Pt[3] = CPoint(230, 70);
>         Pt[4] = CPoint(180, 120);
>         Pt[5] = CPoint(180, 90);
>         Pt[6] = CPoint(20, 90);
>         pDC->Polygon(Pt, 7);  // Msvc Polygon call function
>
> Maybe this issue is:
> https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-polygon
>
> Polygon expect param const POINT *apt;
> and IUP uses array type int?
>
> >> 2. Memory corruption at srcglcontrols/iup_gldraw.c
> >> variable points has size of 6, but call Polygon with only size 3.
> >> iupGLDrawPolygon call msvc Polygon function
>
>   > Same
>
> >> 3. Possible division by zero at srcglcontrols/iup_gldraw.c
> >> variable sb_range can be zero
>
>   >If range is zero the scrollbar is not displayed, so that function is
> never called. But I added a test.
> Thanks.
>
> regards,
> 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