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/tclIO.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/tclIO.h')
-rw-r--r-- | generic/tclIO.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclIO.h b/generic/tclIO.h index ffbfa31..eccc7a9 100644 --- a/generic/tclIO.h +++ b/generic/tclIO.h @@ -44,7 +44,7 @@ typedef struct ChannelBuffer { int bufLength; /* How big is the buffer? */ struct ChannelBuffer *nextPtr; /* Next buffer in chain. */ - char buf[1]; /* Placeholder for real buffer. The real + char buf[TCLFLEXARRAY]; /* Placeholder for real buffer. The real * buffer occuppies this space + bufSize-1 * bytes. This must be the last field in the * structure. */ |