]> git.ipfire.org Git - thirdparty/openwrt.git/commit
mac80211: mwifiex: replace one-element arrays with flexible array members 24451/head
authorGeorgi Valkov <gvalkov@gmail.com>
Thu, 16 Jul 2026 09:28:00 +0000 (12:28 +0300)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Tue, 28 Jul 2026 18:21:31 +0000 (20:21 +0200)
commit8ab2eb1262664a5cec793de0ba03c074ddfd9084
treeb96b740f5e3e1e58e459536f151d3ea0ab7c17f7
parentc22686329b63652fe7924efcf94855fdb234125e
mac80211: mwifiex: replace one-element arrays with flexible array members

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>
package/kernel/mac80211/Makefile
package/kernel/mac80211/patches/mwl/111-wifi-mwifiex-replace-one-element-arrays-with-flexibl.patch [new file with mode: 0644]