Overview
| Artifact ID: | 17afaa67190ab09baae1009a568ad9283e63d082a8189b176a2f00b2edd08665 |
|---|---|
| Ticket: | bd94500678e837d7ed50cf6d5000df8f38cd5e39
SEGFAULT by conversion of unicode (out of BMP) to byte-array. |
| User & Date: | dgp on 2019-03-01 20:34:53 |
Changes
- icomment:
A fix is now committed to the 8.7 and trunk branches. Tcl_UtfToUniChar() was completely broken for single-byte UTF-8 sequences. They generated Tcl_UniChar values pulled from uninitialized memory. It is difficult to believe that a total breakage like this was not detected by the Tcl test suite. Either we do not test the routine at all, or all of our tests have been disabled in their effectiveness by internal replacement of calls to the broken function by invocation of macros that function correctly. This needs to be pursued and corrected. I note also that it appears that the new stealth conversion to cp1252 encoding raises the possibility of the encoded output being longer than the encoded input (single bytes replaced by double bytes). This will upset the expectations of some callers that use these Tcl routines to do in-place processing in a single buffer.
- login: "dgp"
- mimetype: "text/plain"