summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-01-29 17:48:19 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-01-29 17:48:19 (GMT)
commit343cc995c69b2d0d5307106d6a70573682d4fe37 (patch)
tree23f487ce951f6d2279cbd779cc3f9a31f7ccb5f9 /generic
parent8c3b65404122b4ebf39db0dc500da65fca99e1d5 (diff)
parent36c44d8572394858bf7e0956c4b8e1eecc333eb6 (diff)
downloadtcl-343cc995c69b2d0d5307106d6a70573682d4fe37.zip
tcl-343cc995c69b2d0d5307106d6a70573682d4fe37.tar.gz
tcl-343cc995c69b2d0d5307106d6a70573682d4fe37.tar.bz2
Protect against extension variable resolvers that fail to play by the post-Var Reform rules.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclVar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index ec4c13c..0228a2c 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -4746,7 +4746,7 @@ 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);
}