From 18d98caf85ba0de87a91682af5678f6bd580a778 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 2 Apr 2003 19:31:19 +0000 Subject: * 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] --- ChangeLog | 7 +++++++ generic/tclParse.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c4ef02..f9bc2b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-04-02 Don Porter + + * 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] + 2003-04-01 Mo DeJong * unix/configure: Regen. 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; -- cgit v0.12