diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-02-27 21:29:43 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-02-27 21:29:43 (GMT) |
commit | 050b6c3d5f632fea7bf549688c54be65fba7bee2 (patch) | |
tree | 007b045355fdadddb97c53f8d0d714ef29a351ed /generic/tclBinary.c | |
parent | f04b875d88bbe9cd4d2114d60c194be01a7c9e04 (diff) | |
parent | 57d9952ece8f81fc6802097bace965a196bb849b (diff) | |
download | tcl-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/tclBinary.c')
-rw-r--r-- | generic/tclBinary.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 00d7eba..1f78d18 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -1354,7 +1354,7 @@ BinaryFormatCmd( badField: { Tcl_UniChar ch = 0; - char buf[TCL_UTF_MAX + 1]; + char buf[TCL_UTF_MAX + 1] = ""; TclUtfToUniChar(errorString, &ch); buf[Tcl_UniCharToUtf(ch, buf)] = '\0'; @@ -1724,7 +1724,7 @@ BinaryScanCmd( badField: { Tcl_UniChar ch = 0; - char buf[TCL_UTF_MAX + 1]; + char buf[TCL_UTF_MAX + 1] = ""; TclUtfToUniChar(errorString, &ch); buf[Tcl_UniCharToUtf(ch, buf)] = '\0'; |