Commit 496db69f authored by Haoyu Li's avatar Haoyu Li Committed by Johannes Berg
Browse files

wifi: mac80211: init cnt before accessing elem in ieee80211_copy_mbssid_beacon



With the new __counted_by annocation in cfg80211_mbssid_elems,
the "cnt" struct member must be set before accessing the "elem"
array. Failing to do so will trigger a runtime warning when enabling
CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE.

Fixes: c14679d7 ("wifi: cfg80211: Annotate struct cfg80211_mbssid_elems with __counted_by")
Signed-off-by: default avatarHaoyu Li <lihaoyu499@gmail.com>
Link: https://patch.msgid.link/20241123172500.311853-1-lihaoyu499@gmail.com


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 49dba1de
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment