Re: [PATCH libX11] Use flexible array member instead of fake size.

2018-03-15 Thread Keith Packard
Michal Srb writes: > The _XimCacheStruct structure is followed in memory by two strings containing > fname and encoding. The memory was accessed using the last member of the > structure `char fname[1]`. That is a lie, prohibits us from using sizeof and > confuses checkers. Lets declare it properl

Re: [PATCH libX11] Use flexible array member instead of fake size.

2018-03-15 Thread Walter Harms
> Michal Srb hat am 15. März 2018 um 09:50 geschrieben: > > > The _XimCacheStruct structure is followed in memory by two strings containing > fname and encoding. The memory was accessed using the last member of the > structure `char fname[1]`. That is a lie, prohibits us from using sizeof and

[PATCH libX11] Use flexible array member instead of fake size.

2018-03-15 Thread Michal Srb
The _XimCacheStruct structure is followed in memory by two strings containing fname and encoding. The memory was accessed using the last member of the structure `char fname[1]`. That is a lie, prohibits us from using sizeof and confuses checkers. Lets declare it properly as a flexible array, so com