From 1c788e178d149302a1d9d5265bc46120de4f5a6a Mon Sep 17 00:00:00 2001
From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
Date: Fri, 23 Oct 2020 15:36:16 +0000
Subject: Fix warning: /home/jboss/workspace/tcl8.7/generic/tclIO.c:9997:27:
 warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]  9997
 |   RemovePoint(nextPtr)[0] = '\r';       |                           ^

---
 generic/tclIO.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/generic/tclIO.c b/generic/tclIO.c
index 82eb581..349e717 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -287,9 +287,9 @@ static int              WillRead(Channel *chanPtr);
 
 #define IsBufferOverflowing(bufPtr) ((bufPtr)->nextAdded>(bufPtr)->bufLength)
 
-#define InsertPoint(bufPtr)	((bufPtr)->buf + (bufPtr)->nextAdded)
+#define InsertPoint(bufPtr)	(&(bufPtr)->buf[(bufPtr)->nextAdded])
 
-#define RemovePoint(bufPtr)	((bufPtr)->buf + (bufPtr)->nextRemoved)
+#define RemovePoint(bufPtr)	(&(bufPtr)->buf[(bufPtr)->nextRemoved])
 
 /*
  * For working with channel state flag bits.
-- 
cgit v0.12