[Mono-dev] libgdiplus linecap issue

Francis A. Bausch fbausch at dracorp.com
Mon Oct 4 20:38:02 EDT 2010

In the recent addition of linecaps to libgdiplus, an issue exists in the implementation of cairo_DrawPath in graphics-cairo.c.

A test on the value of count is needed to make sure array indices are valid at line 642:

gdip_pen_draw_custom_end_cap(graphics, pen, points[count-1].Y, points[count-2].X, points[count-2].Y, points[count-1].X)

it is obvious that count must be >= 2, but the functionality seems to require count > 2.

More information about the Mono-devel-list mailing list