summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-02-27 21:29:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-02-27 21:29:43 (GMT)
commit050b6c3d5f632fea7bf549688c54be65fba7bee2 (patch)
tree007b045355fdadddb97c53f8d0d714ef29a351ed /generic/tclCompile.c
parentf04b875d88bbe9cd4d2114d60c194be01a7c9e04 (diff)
parent57d9952ece8f81fc6802097bace965a196bb849b (diff)
downloadtcl-050b6c3d5f632fea7bf549688c54be65fba7bee2.zip
tcl-050b6c3d5f632fea7bf549688c54be65fba7bee2.tar.gz
tcl-050b6c3d5f632fea7bf549688c54be65fba7bee2.tar.bz2
Fix [bd94500678e837d7]: SEGFAULT by conversion of unicode (out of BMP) to byte-array
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 32ddfc8..3621cc2 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -1744,7 +1744,7 @@ TclWordKnownAtCompileTime(
case TCL_TOKEN_BS:
if (tempPtr != NULL) {
- char utfBuf[TCL_UTF_MAX];
+ char utfBuf[TCL_UTF_MAX] = "";
int length = TclParseBackslash(tokenPtr->start,
tokenPtr->size, NULL, utfBuf);
@@ -2358,7 +2358,7 @@ TclCompileTokens(
{
Tcl_DString textBuffer; /* Holds concatenated chars from adjacent
* TCL_TOKEN_TEXT, TCL_TOKEN_BS tokens. */
- char buffer[TCL_UTF_MAX];
+ char buffer[TCL_UTF_MAX] = "";
int i, numObjsToConcat, length, adjust;
unsigned char *entryCodeNext = envPtr->codeNext;
#define NUM_STATIC_POS 20