Buffer overrun in TclCompileTokens()
Closed / Fixed530320ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 25 years ago
Descriptionplain2002-03-15 14:29:18
Bug found in Tcl 8.4a4, but also in 8.3.
Reproductible script:
proc bug {} {
puts $array([expr {a+2}])
}
In generic/tclCompile.c, function TclCompileTokens(),
line 1242:
sprintf(buffer,
"\n (parsing index for array \"%.*s\")",
((nameBytes > 100)? 100 : nameBytes), name);
but buffer is large enough to contains TCL_UTF_MAX :(.
dkf Closed ticket [530320ffff].
[History diff]2002-03-15 22:39:47
msoferplain2002-03-16 03:11:13
Logged In: YES user_id=148712 Donal fixed it in 8.4; I just patched core-8-3-1-branch.
Log in (anonymous is fine) to add a comment.