Manifest of check-in
[c667016762]
-
* generic/tclIO.c (WriteChars): Fix for SF #506297, reported by
Martin Forssen <[email protected]>. The encoding
chosen in the script exposing the bug writes out three intro
characters when TCL_ENCODING_START is set, but does not consume
any input as TCL_ENCODING_END is cleared. As some output was
generated the enclosing loop calls UtfToExternal again, again
with START set. Three more characters in the out and still no
use of input ... To break this infinite loop we remove
TCL_ENCODING_START from the set of flags after the first call
(no condition is required, the later calls remove an unset flag,
which is a no-op). This causes the subsequent calls to
UtfToExternal to consume and convert the actual input.
by
andreas_kupries on
2002-01-21 20:37:25.
B fa97315c9cab2d4a166109a69a1f7a3bdc9a40cc
C \n\t*\sgeneric/tclIO.c\s(WriteChars):\sFix\sfor\sSF\s#506297,\sreported\sby\n\t\s\sMartin\sForssen\s<[email protected]>.\sThe\sencoding\n\t\s\schosen\sin\sthe\sscript\sexposing\sthe\sbug\swrites\sout\sthree\sintro\n\t\s\scharacters\swhen\sTCL_ENCODING_START\sis\sset,\sbut\sdoes\snot\sconsume\n\t\s\sany\sinput\sas\sTCL_ENCODING_END\sis\scleared.\sAs\ssome\soutput\swas\n\t\s\sgenerated\sthe\senclosing\sloop\scalls\sUtfToExternal\sagain,\sagain\n\t\s\swith\sSTART\sset.\sThree\smore\scharacters\sin\sthe\sout\sand\sstill\sno\n\t\s\suse\sof\sinput\s...\sTo\sbreak\sthis\sinfinite\sloop\swe\sremove\n\t\s\sTCL_ENCODING_START\sfrom\sthe\sset\sof\sflags\safter\sthe\sfirst\scall\n\t\s\s(no\scondition\sis\srequired,\sthe\slater\scalls\sremove\san\sunset\sflag,\n\t\s\swhich\sis\sa\sno-op).\sThis\scauses\sthe\ssubsequent\scalls\sto\n\t\s\sUtfToExternal\sto\sconsume\sand\sconvert\sthe\sactual\sinput.\n
D 2002-01-21T20:37:25
F ChangeLog 2dd099169d39db1b65f64a94e74f7f62582bfa4b
F generic/tclIO.c aa613212988eb34550efeff2bb1e434f9e380f36
F tests/io.test 55a5e7a149ab67bef5319845c18ba20e484e7a91
P fa97315c9cab2d4a166109a69a1f7a3bdc9a40cc
U andreas_kupries
Z 764a72af95df274c79bd231df99bb4d7