summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-07-15 17:59:13 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-07-15 17:59:13 (GMT)
commit9c60e1eea154351895b96dee5b819149efa8105b (patch)
treee8266f7494f4f4902c64da81e52acd62469d320f
parent5c85ae6be1c273dc4c2d2125a5f681a81d998b8f (diff)
parent7d3e1db1dc03de209aac3954c74450f0d29df715 (diff)
downloadtcl-9c60e1eea154351895b96dee5b819149efa8105b.zip
tcl-9c60e1eea154351895b96dee5b819149efa8105b.tar.gz
tcl-9c60e1eea154351895b96dee5b819149efa8105b.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.
*/