summaryrefslogtreecommitdiffstats
path: root/generic/tclProc.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-01-13 11:46:50 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-01-13 11:46:50 (GMT)
commitd679a49bc0da1e368daa6af07fcf72af2e3dceb4 (patch)
tree8e04727291980fa997bbff3728ccf8ff601767c6 /generic/tclProc.c
parent32ab46ae406d7fd3db0516dd45f38c7c48c6bd3c (diff)
downloadtcl-d679a49bc0da1e368daa6af07fcf72af2e3dceb4.zip
tcl-d679a49bc0da1e368daa6af07fcf72af2e3dceb4.tar.gz
tcl-d679a49bc0da1e368daa6af07fcf72af2e3dceb4.tar.bz2
Fix [6cb3db4965]: pointer arithmetic using NULL in InitArgsAndLocals()
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r--generic/tclProc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c
index 642294c..7921d38 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -1428,7 +1428,6 @@ InitArgsAndLocals(
numArgs = procPtr->numArgs;
argCt = framePtr->objc - skip; /* Set it to the number of args to the
* procedure. */
- argObjs = framePtr->objv + skip;
if (numArgs == 0) {
if (argCt) {
goto incorrectArgs;
@@ -1436,6 +1435,7 @@ InitArgsAndLocals(
goto correctArgs;
}
}
+ argObjs = framePtr->objv + skip;
imax = ((argCt < numArgs-1) ? argCt : numArgs-1);
for (i = 0; i < imax; i++, varPtr++, defPtr ? defPtr++ : defPtr) {
/*