summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index fdcddab..d03f1cb 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -5538,7 +5538,9 @@ TEBCresume(
p = ustring1;
end = ustring1 + length;
for (; ustring1 < end; ustring1++) {
- if ((*ustring1 == *ustring2) && (length2==1 ||
+ if ((*ustring1 == *ustring2) &&
+ /* Fix bug [69218ab7b]: restrict max compare length. */
+ (end-ustring1 >= length2) && (length2==1 ||
memcmp(ustring1, ustring2, sizeof(Tcl_UniChar) * length2)
== 0)) {
if (p != ustring1) {