diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2004-09-29 19:36:34 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2004-09-29 19:36:34 (GMT) |
commit | db28fb893dc50fd54f948ec4bf06c296cb4165f2 (patch) | |
tree | 764d635a39043219a6e221c8c71a651b9ac1c9a6 /generic | |
parent | c36a55ff0083738d8bd88d1ba5c164046e441f8f (diff) | |
download | tcl-db28fb893dc50fd54f948ec4bf06c296cb4165f2.zip tcl-db28fb893dc50fd54f948ec4bf06c296cb4165f2.tar.gz tcl-db28fb893dc50fd54f948ec4bf06c296cb4165f2.tar.bz2 |
fix for buffer overflow in [subst], [Bug 1036649]
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclBasic.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index f7116dd..8b199ce 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.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: tclBasic.c,v 1.75.2.9 2004/07/28 16:28:20 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.75.2.10 2004/09/29 19:36:36 msofer Exp $ */ #include "tclInt.h" @@ -3727,6 +3727,16 @@ Tcl_EvalEx(interp, script, numBytes, flags) return TCL_OK; } } while (bytesLeft > 0); + + if (nested) { + /* + * This nested script did not terminate in ']', it is an error. + */ + + code = TCL_ERROR; + goto error; + } + iPtr->termOffset = p - script; iPtr->varFramePtr = savedVarFramePtr; return TCL_OK; |