diff options
author | dgp <dgp@users.sourceforge.net> | 2015-01-29 17:37:59 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-01-29 17:37:59 (GMT) |
commit | 36c44d8572394858bf7e0956c4b8e1eecc333eb6 (patch) | |
tree | dac49cf692a8eb53f464603e06464408be4e0451 /generic/tclVar.c | |
parent | edce4263d79bad62b9c06d66bab9ac954cafb6df (diff) | |
download | tcl-36c44d8572394858bf7e0956c4b8e1eecc333eb6.zip tcl-36c44d8572394858bf7e0956c4b8e1eecc333eb6.tar.gz tcl-36c44d8572394858bf7e0956c4b8e1eecc333eb6.tar.bz2 |
Protect against extension variable resolvers that fail to play by
the post-Var Reform rules.
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r-- | generic/tclVar.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index a6f6cf4..33071ae 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -3914,7 +3914,8 @@ Tcl_GetVariableFullName( } else if (iPtr->varFramePtr->procPtr) { int index = varPtr - iPtr->varFramePtr->compiledLocals; - if (index < iPtr->varFramePtr->numCompiledLocals) { + if (index >= 0 + && index < iPtr->varFramePtr->numCompiledLocals) { namePtr = localName(iPtr->varFramePtr, index); Tcl_AppendObjToObj(objPtr, namePtr); } |