summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmdsSZ.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-02 16:04:59 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-02 16:04:59 (GMT)
commita2ceb90c0d44ff21472b71ac79b96b577d3c967e (patch)
tree4a8907259172a0e3fb26c1592c5f5a9c9169d90c /generic/tclCompCmdsSZ.c
parente43dfb1f32c14c72a65cb0231694c2619b5ac1ff (diff)
downloadtcl-a2ceb90c0d44ff21472b71ac79b96b577d3c967e.zip
tcl-a2ceb90c0d44ff21472b71ac79b96b577d3c967e.tar.gz
tcl-a2ceb90c0d44ff21472b71ac79b96b577d3c967e.tar.bz2
Backport [bd94500678e837d7] from 8.7, preventing endless loops in UTF-8 conversions when handling surrogates. Only effective when compiling with -DTCL_UTF_MAX=4|6 (default: 3). Meant for benefit of Androwish.
Diffstat (limited to 'generic/tclCompCmdsSZ.c')
-rw-r--r--generic/tclCompCmdsSZ.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c
index c13376b..53bff6e 100644
--- a/generic/tclCompCmdsSZ.c
+++ b/generic/tclCompCmdsSZ.c
@@ -1496,7 +1496,7 @@ TclSubstCompile(
for (endTokenPtr = tokenPtr + parse.numTokens;
tokenPtr < endTokenPtr; tokenPtr = TokenAfter(tokenPtr)) {
int length, literal, catchRange, breakJump;
- char buf[TCL_UTF_MAX];
+ char buf[TCL_UTF_MAX] = "";
JumpFixup startFixup, okFixup, returnFixup, breakFixup;
JumpFixup continueFixup, otherFixup, endFixup;