summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-07-15 17:57:34 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-07-15 17:57:34 (GMT)
commit7d3e1db1dc03de209aac3954c74450f0d29df715 (patch)
tree3f48e1470c9f16d85aa7c53cdc03a46c73d7f581
parent6670acc974bc94845dc92e48f2789cbf6520f727 (diff)
downloadtcl-7d3e1db1dc03de209aac3954c74450f0d29df715.zip
tcl-7d3e1db1dc03de209aac3954c74450f0d29df715.tar.gz
tcl-7d3e1db1dc03de209aac3954c74450f0d29df715.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 33071ae..c013e8d 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -672,7 +672,7 @@ TclObjLookupVarEx(
}
part1 = TclGetStringFromObj(part1Ptr, &len1);
- if (!parsed && (*(part1 + len1 - 1) == ')')) {
+ if (!parsed && len1 && (*(part1 + len1 - 1) == ')')) {
/*
* part1Ptr is possibly an unparsed array element.
*/