summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-04-02 19:31:19 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-04-02 19:31:19 (GMT)
commit18d98caf85ba0de87a91682af5678f6bd580a778 (patch)
tree46aeb4cbad2611a17dce42249ea85dd1880cdeda /generic
parent078b1919159c88a5ca93dbc9a7cd3459af65c1ea (diff)
downloadtcl-18d98caf85ba0de87a91682af5678f6bd580a778.zip
tcl-18d98caf85ba0de87a91682af5678f6bd580a778.tar.gz
tcl-18d98caf85ba0de87a91682af5678f6bd580a778.tar.bz2
* generic/tclParse.c (TclSubstTokens): Moved declaration of
utfCharBytes to beginning of procedure so that it does not go out of scope (get free()d) while append is still pointing to it. [Bugs 703167, 713754]
Diffstat (limited to 'generic')
-rw-r--r--generic/tclParse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 5a7bb92..986c583 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclParse.c,v 1.26 2003/03/13 02:48:53 dgp Exp $
+ * RCS: @(#) $Id: tclParse.c,v 1.27 2003/04/02 19:31:23 dgp Exp $
*/
#include "tclInt.h"
@@ -1955,6 +1955,7 @@ TclSubstTokens(interp, tokenPtr, count, tokensLeftPtr)
Tcl_Obj *appendObj = NULL;
CONST char *append = NULL;
int appendByteLength = 0;
+ char utfCharBytes[TCL_UTF_MAX];
switch (tokenPtr->type) {
case TCL_TOKEN_TEXT:
@@ -1963,7 +1964,6 @@ TclSubstTokens(interp, tokenPtr, count, tokensLeftPtr)
break;
case TCL_TOKEN_BS: {
- char utfCharBytes[TCL_UTF_MAX];
appendByteLength = Tcl_UtfBackslash(tokenPtr->start,
(int *) NULL, utfCharBytes);
append = utfCharBytes;