Blob Blame Raw
From c459e0ddf8d2ce3993902fe17cb413b843ae89d5 Mon Sep 17 00:00:00 2001
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
Date: Sat, 22 Oct 2016 00:17:33 +0900
Subject: [PATCH] hexstrut: fix one-byte-ahead access for ccolor

Since bp->colors is allocated with the size
bp->ncolors * sizeof(XColor), with
bp->colors[t->ccolor] t->ccolor must be less than
bp->ncolors.
---
 hacks/glx/hexstrut.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hacks/glx/hexstrut.c b/hacks/glx/hexstrut.c
index f264609..d7d55b5 100644
--- a/hacks/glx/hexstrut.c
+++ b/hacks/glx/hexstrut.c
@@ -196,7 +196,7 @@ tick_triangles (ModeInfo *mi)
           t->rot += step * (t->rot > 0 ? 1 : -1);
 
           t->ccolor++;
-          if (t->ccolor > bp->ncolors)
+          if (t->ccolor >= bp->ncolors)
             t->ccolor = 0;
 
           if (t->rot > 1 || t->rot < -1)
-- 
2.9.3