summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-01-29 17:37:59 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-01-29 17:37:59 (GMT)
commit36c44d8572394858bf7e0956c4b8e1eecc333eb6 (patch)
treedac49cf692a8eb53f464603e06464408be4e0451
parentedce4263d79bad62b9c06d66bab9ac954cafb6df (diff)
downloadtcl-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.
-rw-r--r--generic/tclVar.c3
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);
}