From 0ed1f23a446acb153b15610de7d51bfe7dcec3b0 Mon Sep 17 00:00:00 2001 From: Peter Harris Date: Fri, 24 Aug 2012 10:33:38 -0400 Subject: [PATCH] Avoid stack smash when drawing dashed lines Signed-off-by: Peter Harris --- mi/miwideline.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mi/miwideline.c b/mi/miwideline.c index ca18f15..b76e7a8 100644 --- a/mi/miwideline.c +++ b/mi/miwideline.c @@ -994,7 +994,7 @@ miLineProjectingCap(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, { int xorgi = 0, yorgi = 0; int lw; - PolyEdgeRec lefts[2], rights[2]; + PolyEdgeRec lefts[4], rights[4]; int lefty, righty, topy, bottomy; PolyEdgePtr left, right; PolyEdgePtr top, bottom; @@ -1166,7 +1166,7 @@ miWideSegment(DrawablePtr pDrawable, PolyEdgePtr top, bottom; int lefty, righty, topy, bottomy; int signdx; - PolyEdgeRec lefts[2], rights[2]; + PolyEdgeRec lefts[4], rights[4]; LineFacePtr tface; int lw = pGC->lineWidth; @@ -1520,7 +1520,7 @@ miWideDashSegment(DrawablePtr pDrawable, PolyVertexRec vertices[4]; PolyVertexRec saveRight, saveBottom; PolySlopeRec slopes[4]; - PolyEdgeRec left[2], right[2]; + PolyEdgeRec left[4], right[4]; LineFaceRec lcapFace, rcapFace; int nleft, nright; int h; -- 1.7.5.4