diff mbox series

[08/28] wifi: cfg80211/mac80211: Fix ML element common size validation

Message ID 20221005145226.8b737f8d84a4.Id558683049f7d6b9c2e79e9e81b9aa0c01e6821e@changeid (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show
Series wifi: further MLO work | expand

Commit Message

Johannes Berg Oct. 5, 2022, 1 p.m. UTC
From: Ilan Peer <ilan.peer@intel.com>

The Multi-Link element can be fragmented, thus its size can exceed 254.
Thus, modify ieee80211_mle_size_ok() to use 'size_t len' instead of
'u8 len'.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 include/linux/ieee80211.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 442b13333da8..b935a85b2f44 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -4601,7 +4601,7 @@  static inline u8 ieee80211_mle_common_size(const u8 *data)
  * @data: pointer to the element data
  * @len: length of the containing element
  */
-static inline bool ieee80211_mle_size_ok(const u8 *data, u8 len)
+static inline bool ieee80211_mle_size_ok(const u8 *data, size_t len)
 {
 	const struct ieee80211_multi_link_elem *mle = (const void *)data;
 	u8 fixed = sizeof(*mle);