Skip to content
Tcl Source Code Artifact [6dddbc1976]
Login

Artifact [6dddbc1976]

Artifact 6dddbc1976f98f4da6da8a0a621c1d1f19640e01:

Manifest of check-in [6dddbc1976] - * generic/tclIO.c (ReadChars): Added check and panic and commentary to a piece of code which relies on BUFFER_PADDING to create enough space at the beginning of each buffer forthe insertion of partial multi-byte data at the beginning of a buffer. To explain why this code is ok, and as precaution if someone twiddled the BUFFER_PADDING into uselessness. * generic/tclIO.c (ReadChars): [SF Tcl Bug 1462248]. Added code temporarily suppress the use of TCL_ENCODING_END set when eof was reached while the buffer we are converting is not truly the last buffer in the queue. together with the Utf bug below it was possible to completely bollox the buffer data structures, eventually crashing Tcl. * generic/tclEncoding.c (UtfToUtfProc): Fixed problem where the function accessed memory beyond the end of the input buffer. When TCL_ENCODING_END is set and the last bytes of the buffer start a multi-byte sequence. This bug contributed to [SF Tcl Bug 1462248]. by andreas_kupries on 2006-04-05 00:05:53.
B 41fa2043e4e6610a0ce1c90ba61f867f287913f7
C \n\t*\sgeneric/tclIO.c\s(ReadChars):\sAdded\scheck\sand\spanic\sand\n\t\s\scommentary\sto\sa\spiece\sof\scode\swhich\srelies\son\sBUFFER_PADDING\sto\n\t\s\screate\senough\sspace\sat\sthe\sbeginning\sof\seach\sbuffer\sforthe\n\t\s\sinsertion\sof\spartial\smulti-byte\sdata\sat\sthe\sbeginning\sof\sa\n\t\s\sbuffer.\sTo\sexplain\swhy\sthis\scode\sis\sok,\sand\sas\sprecaution\sif\n\t\s\ssomeone\stwiddled\sthe\sBUFFER_PADDING\sinto\suselessness.\n\n\t*\sgeneric/tclIO.c\s(ReadChars):\s[SF\sTcl\sBug\s1462248].\sAdded\scode\n\t\s\stemporarily\ssuppress\sthe\suse\sof\sTCL_ENCODING_END\sset\swhen\seof\n\t\s\swas\sreached\swhile\sthe\sbuffer\swe\sare\sconverting\sis\snot\struly\sthe\n\t\s\slast\sbuffer\sin\sthe\squeue.\stogether\swith\sthe\sUtf\sbug\sbelow\sit\swas\n\t\s\spossible\sto\scompletely\sbollox\sthe\sbuffer\sdata\sstructures,\n\t\s\seventually\scrashing\sTcl.\n\n\t*\sgeneric/tclEncoding.c\s(UtfToUtfProc):\sFixed\sproblem\swhere\sthe\n\t\s\sfunction\saccessed\smemory\sbeyond\sthe\send\sof\sthe\sinput\n\t\s\sbuffer.\sWhen\sTCL_ENCODING_END\sis\sset\sand\sthe\slast\sbytes\sof\sthe\n\t\s\sbuffer\sstart\sa\smulti-byte\ssequence.\sThis\sbug\scontributed\sto\s[SF\n\t\s\sTcl\sBug\s1462248].\n
D 2006-04-05T00:05:53
F ChangeLog 0eae246941c524e0ad2667067f5c74df52710a35
F generic/tclEncoding.c 254037e1a6c879e923ffc31fea9d46d701c96f52
F generic/tclIO.c a5928c43b4d69d686c5eaee365946b7d3ae53a7e
F win/configure 77c425f06d6ba9f852df91ec566c7d719a2dd7c5 x
F win/tcl.m4 4a2e0a50cb495003b25c30f5717293a22cd7bb9b
P 67db0a4f169909bbceca94d73338dd529cd3acc8
U andreas_kupries
Z 0779055a6268c112878d843ff4201605