From 8fafd0a6579e6dcb457ff63fe6f5eb96d3a3bce2 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 12 May 2003 20:16:06 +0000 Subject: * generic/tclBasic.c (TclInvokeObjectCommand): objv[argc] is no longer set to NULL (Tcl_CreateObjCommand docs already say that it should not be accessed). FossilOrigin-Name: 4b6b0d983c881df676d8a9e1ea6b1501e18d1fee --- ChangeLog | 4 ++++ generic/tclBasic.c | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index bfed5e5..ebb70a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2003-05-12 Don Porter + * generic/tclBasic.c (TclInvokeObjectCommand): objv[argc] is no + longer set to NULL (Tcl_CreateObjCommand docs already say that it + should not be accessed). + * generic/tclObj.c (tclCmdNameType): Corrected variable use of the otherValuePtr or the twoPtrValue.ptr1 fields to store a (ResolvedCmdName *) as the internal rep. [Bug 726018]. diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 0ad0818..8eda27e 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.75.2.2 2003/05/05 16:52:33 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.75.2.3 2003/05/12 20:16:08 dgp Exp $ */ #include "tclInt.h" @@ -1837,9 +1837,9 @@ TclInvokeObjectCommand(clientData, interp, argc, argv) * end-of-objv word. */ - if ((argc + 1) > NUM_ARGS) { + if (argc > NUM_ARGS) { objv = (Tcl_Obj **) - ckalloc((unsigned)(argc + 1) * sizeof(Tcl_Obj *)); + ckalloc((unsigned)(argc * sizeof(Tcl_Obj *))); } for (i = 0; i < argc; i++) { @@ -1849,7 +1849,6 @@ TclInvokeObjectCommand(clientData, interp, argc, argv) Tcl_IncrRefCount(objPtr); objv[i] = objPtr; } - objv[argc] = 0; /* * Invoke the command's object-based Tcl_ObjCmdProc. -- cgit v0.12