From 962d2a813067833151a5269899a50a865cd39e91 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 7 Feb 2022 15:35:09 +0000 Subject: Fix [1fe745559a]: 8.7, 9.0: Conditional jump or move depends on uninitialised value in Tcl_UniCharToUtf --- generic/tclUtil.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/generic/tclUtil.c b/generic/tclUtil.c index e29afcc..01548ae 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -802,9 +802,11 @@ TclCopyAndCollapse( char c = *src; if (c == '\\') { + char buf[4] = ""; int numRead; - int backslashCount = TclParseBackslash(src, count, &numRead, dst); + int backslashCount = TclParseBackslash(src, count, &numRead, &buf); + memcpy(dst, buf, backslashCount); dst += backslashCount; newCount += backslashCount; src += numRead; -- cgit v0.12