The last `for' loop in Tcl_GetAlias function:
for (i = 1; i < objc; i++) {
*argvPtr[i - 1] = TclGetString(objv[i]);
}
The bug spot is `*argvPtr[i - 1]'. Obviously, it should be `(*argvPtr)[i - 1]', otherwise, it causes invalid memory access when objc > 2, since it is only when idx is 0 that *argvPtr[idx] is the same as (*argvPtr)[idx] in effect.
Thus, the fixed code is:
for (i = 1; i < objc; i++) {
(*argvPtr)[i - 1] = TclGetString(objv[i]);
}
It is verified by our application product.
Logged In: YES
user_id=148712
Originator: NO
Fixed in HEAD and 8.4