mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-13 19:48:16 +04:00
Replace deprecated one-element arrays with flexible array members. CONFIG_FORTIFY_SOURCE reports the following warning when one-element arrays are used as variable-length buffers: sta_cmd.c:1033 mwifiex_sta_prepare_cmd memcpy: detected field-spanning write (size 84) of single field "domain->triplet" at .../marvell/mwifiex/sta_cmd.c:1033 (size 3) Convert affected structs to use flexible array members. - Preserve existing wire layouts. - Use DECLARE_FLEX_ARRAY() for structs inside affected unions. This fix has been accepted upstream: https://github.com/torvalds/linux/commit/1cb5845a58d8e1f85d5766c6fbcbfddf96c212a1 Tested-on: WRT3200ACM Signed-off-by: Georgi Valkov <gvalkov@gmail.com> Link: https://github.com/openwrt/openwrt/pull/24451 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>