diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-11 12:31:48 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-11 12:31:48 (GMT) |
commit | 7f62b768876fc8b0779d10ae3fcba1fc7aeaba04 (patch) | |
tree | cc67956829bcf5ad5af0e714d5184b80475d25ce /generic/tclCompile.h | |
parent | 0715d88019e40aa514b3b2d3ba691ab7d0a96eb2 (diff) | |
download | tcl-7f62b768876fc8b0779d10ae3fcba1fc7aeaba04.zip tcl-7f62b768876fc8b0779d10ae3fcba1fc7aeaba04.tar.gz tcl-7f62b768876fc8b0779d10ae3fcba1fc7aeaba04.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.h | 6 |
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 |