--- sourceforge.net/trunk/rdesktop/orders.c 2005/03/10 22:48:15 844 +++ sourceforge.net/trunk/rdesktop/orders.c 2005/04/03 18:08:05 879 @@ -695,10 +695,12 @@ points[0].x = os->x; points[0].y = os->y; + pen.style = pen.width = 0; + pen.colour = os->fgcolour; index = 0; data = ((os->lines - 1) / 4) + 1; - for (next = 1; (next < os->lines) && (data < os->datasize); next++) + for (next = 1; (next <= os->lines) && (data < os->datasize); next++) { if ((next - 1) % 4 == 0) flags = os->data[index++]; @@ -716,6 +718,8 @@ ui_polyline(os->opcode - 1, points, os->lines + 1, &pen); else error("polyline parse error\n"); + + xfree(points); } /* Process an ellipse order */