Commit fb99c7d4 authored by Ilan Peer's avatar Ilan Peer Committed by Johannes Berg

wifi: cfg80211/mac80211: Fix ML element common size validation

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: default avatarIlan Peer <ilan.peer@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 1403b109
...@@ -4601,7 +4601,7 @@ static inline u8 ieee80211_mle_common_size(const u8 *data) ...@@ -4601,7 +4601,7 @@ static inline u8 ieee80211_mle_common_size(const u8 *data)
* @data: pointer to the element data * @data: pointer to the element data
* @len: length of the containing element * @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; const struct ieee80211_multi_link_elem *mle = (const void *)data;
u8 fixed = sizeof(*mle); u8 fixed = sizeof(*mle);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment