Manifest of check-in
[1b53b7b70c]
-
* 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:38:06.
B 8006e9294ec2597f99e2a55bcf2ce75b68843928
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:38:06
F ChangeLog 8d4a8a401a26eb32399b8c14b5924741bc7a71c1
F generic/tclIO.c cc960a4461cab766ef2d9f7fef4a561ffc9e90f4
F tests/io.test 6405067ca6a0e6904d47d30a2f1a1d03e2c97fa8
P 8006e9294ec2597f99e2a55bcf2ce75b68843928
U andreas_kupries
Z 82c025ea6e20cf9bda0d4873e31914d7