diff options
author | dgp <dgp@users.sourceforge.net> | 2016-10-28 14:28:40 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-10-28 14:28:40 (GMT) |
commit | 7939b4cf6cc04a3b282df315b7d1827c47e0d61a (patch) | |
tree | 3075fcd5a4647969adca27a0ad08ee27f3e3aa90 /generic | |
parent | 93b9034a947791a4a4dbd6a5647939ef5ddc2ae7 (diff) | |
parent | a81f6b904b3b6777ed2da4e55b669b7e4770dcc9 (diff) | |
download | tcl-7939b4cf6cc04a3b282df315b7d1827c47e0d61a.zip tcl-7939b4cf6cc04a3b282df315b7d1827c47e0d61a.tar.gz tcl-7939b4cf6cc04a3b282df315b7d1827c47e0d61a.tar.bz2 |
merge trunk
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCmdIL.c | 8 | ||||
-rw-r--r-- | generic/tclStringObj.c | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 7420538..bb3c9b7 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -2179,6 +2179,14 @@ Tcl_JoinObjCmd( resObjPtr = Tcl_NewObj(); for (i = 0; i < listLen; i++) { if (i > 0) { + + /* + * NOTE: This code is relying on Tcl_AppendObjToObj() **NOT** + * to shimmer joinObjPtr. If it did, then the case where + * objv[1] and objv[2] are the same value would not be safe. + * Accessing elemPtrs would crash. + */ + Tcl_AppendObjToObj(resObjPtr, joinObjPtr); } Tcl_AppendObjToObj(resObjPtr, elemPtrs[i]); diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 332990d..cc30602 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -1182,6 +1182,8 @@ Tcl_AppendUnicodeToObj( * Side effects: * The string rep of appendObjPtr is appended to the string * representation of objPtr. + * IMPORTANT: This routine does not and MUST NOT shimmer appendObjPtr. + * Callers are counting on that. * *---------------------------------------------------------------------- */ |