summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-11 08:36:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-11 08:36:16 (GMT)
commitdb31b9f1cedb54fbdc52442ea1c21bf06c556b68 (patch)
tree18ebe6081d8f7060398ae7faf268b4006e4f45ae /generic/tkTextDisp.c
parentae738cdf44ed05a923f20b3b9bb16c1edeaf6c8b (diff)
parentb6336ef4ba80fceda0d210096a47706833f5850f (diff)
downloadtk-db31b9f1cedb54fbdc52442ea1c21bf06c556b68.zip
tk-db31b9f1cedb54fbdc52442ea1c21bf06c556b68.tar.gz
tk-db31b9f1cedb54fbdc52442ea1c21bf06c556b68.tar.bz2
Fix [3bc0f44ef3]: UBSan complains about body.chars[] usage
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r--generic/tkTextDisp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 6ab8508..0eae4a9 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -444,7 +444,7 @@ typedef struct TextDInfo {
typedef struct CharInfo {
int numBytes; /* Number of bytes to display. */
- char chars[1]; /* UTF characters to display.
+ char chars[TKFLEXARRAY]; /* UTF characters to display.
* Allocated as large as necessary. THIS MUST BE THE LAST
* FIELD IN THE STRUCTURE. */
} CharInfo;