git: 1bf09e93cdc2 - main - lang/tcl8[56]: fix unsafe buffer lifetime, bump PORTREVISION

Pietro Cerutti gahr at FreeBSD.org
Fri Sep 10 07:03:44 UTC 2021


The branch main has been updated by gahr:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1bf09e93cdc274fdf6d2b8ed84d0d6b0efa5503b

commit 1bf09e93cdc274fdf6d2b8ed84d0d6b0efa5503b
Author:     Pietro Cerutti <gahr at FreeBSD.org>
AuthorDate: 2021-09-10 07:00:27 +0000
Commit:     Pietro Cerutti <gahr at FreeBSD.org>
CommitDate: 2021-09-10 07:03:41 +0000

    lang/tcl8[56]: fix unsafe buffer lifetime, bump PORTREVISION
    
    PR:             258392
    Reported by:    dim
    Obtained from:  https://core.tcl-lang.org/tcl/info/24b9181478
---
 lang/tcl85/Makefile                    |  2 +-
 lang/tcl85/files/patch-generic_tclIO.c | 21 +++++++++++++++++++++
 lang/tcl86/Makefile                    |  2 +-
 lang/tcl86/files/patch-generic_tclIO.c | 21 +++++++++++++++++++++
 4 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/lang/tcl85/Makefile b/lang/tcl85/Makefile
index de5477eead68..8619601be0ba 100644
--- a/lang/tcl85/Makefile
+++ b/lang/tcl85/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	tcl
 PORTVERSION=	8.5.19
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	lang
 MASTER_SITES=	TCLTK/tcl8_5 \
 		SF/tcl/Tcl/${PORTVERSION}
diff --git a/lang/tcl85/files/patch-generic_tclIO.c b/lang/tcl85/files/patch-generic_tclIO.c
new file mode 100644
index 000000000000..86e683a58fae
--- /dev/null
+++ b/lang/tcl85/files/patch-generic_tclIO.c
@@ -0,0 +1,21 @@
+https://core.tcl-lang.org/tcl/info/24b9181478
+
+--- ../generic/tclIO.c.orig	2020-12-11 17:46:22 UTC
++++ ../generic/tclIO.c
+@@ -3765,6 +3765,7 @@ Write(
+ 				/* State info for channel */
+     char *nextNewLine = NULL;
+     int endEncoding, saved = 0, total = 0, flushed = 0, needNlFlush = 0;
++    char safe[BUFFER_PADDING];
+ 
+     if (srcLen) {
+         WillWrite(chanPtr);
+@@ -3783,7 +3784,7 @@ Write(
+ 
+     while (srcLen + saved + endEncoding > 0) {
+ 	ChannelBuffer *bufPtr;
+-	char *dst, safe[BUFFER_PADDING];
++	char *dst;
+ 	int result, srcRead, dstLen, dstWrote, srcLimit = srcLen;
+ 
+ 	if (nextNewLine) {
diff --git a/lang/tcl86/Makefile b/lang/tcl86/Makefile
index ec631a425df9..aec0324bafc7 100644
--- a/lang/tcl86/Makefile
+++ b/lang/tcl86/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	tcl
 DISTVERSION=	${TCL_VERSION}${TCL_RC}
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	lang
 MASTER_SITES=	SF/tcl/Tcl/${TCL_VERSION}
 PKGNAMESUFFIX=	${SHORT_TCL_VER}
diff --git a/lang/tcl86/files/patch-generic_tclIO.c b/lang/tcl86/files/patch-generic_tclIO.c
new file mode 100644
index 000000000000..a64bf3945b26
--- /dev/null
+++ b/lang/tcl86/files/patch-generic_tclIO.c
@@ -0,0 +1,21 @@
+https://core.tcl-lang.org/tcl/info/24b9181478
+
+--- generic/tclIO.c.orig	2020-12-11 17:46:22 UTC
++++ generic/tclIO.c
+@@ -4277,6 +4277,7 @@ Write(
+ 				/* State info for channel */
+     char *nextNewLine = NULL;
+     int endEncoding, saved = 0, total = 0, flushed = 0, needNlFlush = 0;
++    char safe[BUFFER_PADDING];
+ 
+     if (srcLen) {
+         WillWrite(chanPtr);
+@@ -4295,7 +4296,7 @@ Write(
+ 
+     while (srcLen + saved + endEncoding > 0) {
+ 	ChannelBuffer *bufPtr;
+-	char *dst, safe[BUFFER_PADDING];
++	char *dst;
+ 	int result, srcRead, dstLen, dstWrote, srcLimit = srcLen;
+ 
+ 	if (nextNewLine) {


More information about the dev-commits-ports-main mailing list