summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2015-07-15 17:59:13 (GMT)
committerdgp@users.sourceforge.net <dgp>2015-07-15 17:59:13 (GMT)
commit968f21452bcdbd29ef880c5a9aa6f7fbd198a6dd (patch)
treee8266f7494f4f4902c64da81e52acd62469d320f
parentee1f39b20d8de79e6201edff601280fb7d5d67bc (diff)
parent24b04a9719751ed322ea082bf5dc1d5d35404200 (diff)
downloadtcl-968f21452bcdbd29ef880c5a9aa6f7fbd198a6dd.zip
tcl-968f21452bcdbd29ef880c5a9aa6f7fbd198a6dd.tar.gz
tcl-968f21452bcdbd29ef880c5a9aa6f7fbd198a6dd.tar.bz2
[9bad630c31] Prevent read outside of buffer bounds.
-rw-r--r--generic/tclVar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index e897790..fa217ef 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -600,7 +600,7 @@ TclObjLookupVarEx(
}
part1 = TclGetStringFromObj(part1Ptr, &len1);
- if (!parsed && (*(part1 + len1 - 1) == ')')) {
+ if (!parsed && len1 && (*(part1 + len1 - 1) == ')')) {
/*
* part1Ptr is possibly an unparsed array element.
*/