From d679a49bc0da1e368daa6af07fcf72af2e3dceb4 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 13 Jan 2022 11:46:50 +0000 Subject: Fix [6cb3db4965]: pointer arithmetic using NULL in InitArgsAndLocals() --- generic/tclProc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { /* -- cgit v0.12