summaryrefslogtreecommitdiffstats
path: root/generic/tclTestObj.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2023-11-20 19:52:31 (GMT)
committerdgp <dgp@users.sourceforge.net>2023-11-20 19:52:31 (GMT)
commit24ad51e42eebea61f020a5895b6bbe3101c5d2e1 (patch)
tree734cd72226380b548ba4dac426fd06c5a7124b3d /generic/tclTestObj.c
parent52e8a706727c83e06fe9ef2a02b24e9223a702ba (diff)
downloadtcl-24ad51e42eebea61f020a5895b6bbe3101c5d2e1.zip
tcl-24ad51e42eebea61f020a5895b6bbe3101c5d2e1.tar.gz
tcl-24ad51e42eebea61f020a5895b6bbe3101c5d2e1.tar.bz2
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.
Diffstat (limited to 'generic/tclTestObj.c')
-rw-r--r--generic/tclTestObj.c2
1 files changed, 1 insertions, 1 deletions
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) {