summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-11 12:31:48 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-11 12:31:48 (GMT)
commit3fc6f6245925a152501636599639794d46e2e45a (patch)
treecc67956829bcf5ad5af0e714d5184b80475d25ce /generic/tclCompile.h
parentccc22d3798cd27c3e8cc44ce9ee7b0f405e91062 (diff)
downloadtcl-3fc6f6245925a152501636599639794d46e2e45a.zip
tcl-3fc6f6245925a152501636599639794d46e2e45a.tar.gz
tcl-3fc6f6245925a152501636599639794d46e2e45a.tar.bz2
Fix [https://core.tcl-lang.org/tk/tktview?name=3bc0f44ef3|3bc0f44ef3]: UBSan complains about body.chars[] usage.
(Yes, I know, this one is for Tk, but Tcl was using the same construct too ....)
Diffstat (limited to 'generic/tclCompile.h')
-rw-r--r--generic/tclCompile.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index 1d657a7..03b4a90 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -966,7 +966,7 @@ typedef struct JumpFixupArray {
typedef struct ForeachVarList {
int numVars; /* The number of variables in the list. */
- int varIndexes[1]; /* An array of the indexes ("slot numbers")
+ int varIndexes[TCLFLEXARRAY];/* An array of the indexes ("slot numbers")
* for each variable in the procedure's array
* of local variables. Only scalar variables
* are supported. The actual size of this
@@ -990,7 +990,7 @@ typedef struct ForeachInfo {
* the loop's iteration count. Used to
* determine next value list element to assign
* each loop var. */
- ForeachVarList *varLists[1];/* An array of pointers to ForeachVarList
+ ForeachVarList *varLists[TCLFLEXARRAY];/* An array of pointers to ForeachVarList
* structures describing each var list. The
* actual size of this field will be large
* enough to numVars indexes. THIS MUST BE THE
@@ -1021,7 +1021,7 @@ MODULE_SCOPE const AuxDataType tclJumptableInfoType;
typedef struct {
int length; /* Size of array */
- int varIndices[1]; /* Array of variable indices to manage when
+ int varIndices[TCLFLEXARRAY]; /* Array of variable indices to manage when
* processing the start and end of a [dict
* update]. There is really more than one
* entry, and the structure is allocated to