summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
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)
commit7f62b768876fc8b0779d10ae3fcba1fc7aeaba04 (patch)
treecc67956829bcf5ad5af0e714d5184b80475d25ce /generic/tclEncoding.c
parent0715d88019e40aa514b3b2d3ba691ab7d0a96eb2 (diff)
downloadtcl-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/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 6377ad8..557f241 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -116,7 +116,7 @@ typedef struct {
* entry in this array is 1, otherwise it is
* 0. */
int numSubTables; /* Length of following array. */
- EscapeSubTable subTables[1];/* Information about each EscapeSubTable used
+ EscapeSubTable subTables[TCLFLEXARRAY];/* Information about each EscapeSubTable used
* by this encoding type. The actual size is
* as large as necessary to hold all
* EscapeSubTables. */