Commit 2b1b06b
committed
wifi: mac80211: init cnt before accessing elem in ieee80211_copy_mbssid_beacon
JIRA: https://issues.redhat.com/browse/RHEL-73817
commit 496db69
Author: Haoyu Li <lihaoyu499@gmail.com>
Date: Sun Nov 24 01:25:00 2024 +0800
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: c14679d ("wifi: cfg80211: Annotate struct cfg80211_mbssid_elems with __counted_by")
Signed-off-by: Haoyu Li <lihaoyu499@gmail.com>
Link: https://patch.msgid.link/20241123172500.311853-1-lihaoyu499@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>1 parent 5223916 commit 2b1b06b
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1078 | 1078 | | |
1079 | 1079 | | |
1080 | 1080 | | |
| 1081 | + | |
1081 | 1082 | | |
1082 | 1083 | | |
1083 | 1084 | | |
1084 | 1085 | | |
1085 | 1086 | | |
1086 | 1087 | | |
1087 | | - | |
1088 | 1088 | | |
1089 | 1089 | | |
1090 | 1090 | | |
| |||
0 commit comments