summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-01-13 12:22:51 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-01-13 12:22:51 (GMT)
commit1bc44ec32ab03ebaec021f52129ee1fefcac7850 (patch)
treed8b18fbe1fb427edb02d3fef8f49562bf10f15b9 /generic/tclCompile.c
parentd679a49bc0da1e368daa6af07fcf72af2e3dceb4 (diff)
downloadtcl-1bc44ec32ab03ebaec021f52129ee1fefcac7850.zip
tcl-1bc44ec32ab03ebaec021f52129ee1fefcac7850.tar.gz
tcl-1bc44ec32ab03ebaec021f52129ee1fefcac7850.tar.bz2
Fix [816913a65e]: GrowStringBuffer(): signed integer overflow. And a few similar situations in other place
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index eb2e16b..4a50089 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -3010,7 +3010,7 @@ TclFindCompiledLocal(
if (create || (name == NULL)) {
localVar = procPtr->numCompiledLocals;
- localPtr = ckalloc(TclOffset(CompiledLocal, name) + nameBytes + 1);
+ localPtr = ckalloc(TclOffset(CompiledLocal, name) + 1U + nameBytes);
if (procPtr->firstLocalPtr == NULL) {
procPtr->firstLocalPtr = procPtr->lastLocalPtr = localPtr;
} else {