diff options
| author | dgp@users.sourceforge.net <dgp> | 2003-04-02 19:31:19 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2003-04-02 19:31:19 (GMT) |
| commit | d3cc6b16ad67b7ecc32fc9d69ba65f5d124fa20a (patch) | |
| tree | 46aeb4cbad2611a17dce42249ea85dd1880cdeda /generic/tclParse.c | |
| parent | b27f557b2588e9a53c313e693b8f77696672bfa2 (diff) | |
| download | tcl-d3cc6b16ad67b7ecc32fc9d69ba65f5d124fa20a.zip tcl-d3cc6b16ad67b7ecc32fc9d69ba65f5d124fa20a.tar.gz tcl-d3cc6b16ad67b7ecc32fc9d69ba65f5d124fa20a.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/tclParse.c')
| -rw-r--r-- | generic/tclParse.c | 4 |
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; |
