From 24ad51e42eebea61f020a5895b6bbe3101c5d2e1 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 20 Nov 2023 19:52:31 +0000 Subject: Add TCL_INDEX_TEMP_TABLE to avoid storing pointers to a table on the stack that will not live long enough to stay valid. Crash hazard. --- generic/tclTestObj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index 3b958dd..1f8f73d 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -920,7 +920,7 @@ TestlistobjCmd( return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[1], subcommands, "command", - 0, &cmdIndex) != TCL_OK) { + TCL_INDEX_TEMP_TABLE, &cmdIndex) != TCL_OK) { return TCL_ERROR; } switch(cmdIndex) { -- cgit v0.12