[spice-common 4/8] mi: Avoid stack smash when drawing dashed lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Based off Peter Harris's xserver commit
http://cgit.freedesktop.org/xorg/xserver/commit/mi/miwideline.c?id=20c2a3bcb11b5baf564e2c73a477ba23f5ae2b10
---
 common/lines.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/lines.c b/common/lines.c
index 8b15e79..adf1479 100644
--- a/common/lines.c
+++ b/common/lines.c
@@ -2507,7 +2507,7 @@ miLineProjectingCap (GCPtr pGC, Boolean foreground,
 {
     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;
@@ -2665,7 +2665,7 @@ miWideSegment (GCPtr pGC,
     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;
 
@@ -2982,7 +2982,7 @@ miWideDashSegment (GCPtr pGC,
     PolyVertexRec vertices[4];
     PolyVertexRec saveRight = { 0 }, saveBottom;
     PolySlopeRec slopes[4];
-    PolyEdgeRec left[2], right[2];
+    PolyEdgeRec left[4], right[4];
     LineFaceRec lcapFace, rcapFace;
     int nleft, nright;
     int h;
-- 
1.8.4.2

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]