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

wifi: cfg80211: sme: init n_channels before channels[] access



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

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


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