aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJohannes Berg <[email protected]>2024-03-18 18:53:17 +0200
committerJohannes Berg <[email protected]>2024-03-25 15:38:12 +0100
commitb7793a1a2f370c28b17d9554b58e9dc51afcfcbd (patch)
treebc34cc95d4612e212e203577bf513f6fec9b1cbe /include/linux
parente959521760ddfe7103a4cbe3d117047ff22690c0 (diff)
wifi: ieee80211: check for NULL in ieee80211_mle_size_ok()
For simplicity, we may want to pass a NULL element, and while we should then pass also a zero length, just be a bit more careful here. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240318184907.4d983653cb8d.Ic3ea99b60c61ac2f7d38cb9fd202a03c97a05601@changeid Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ieee80211.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 3385a2cc5b09..a99f048404b8 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -5166,7 +5166,7 @@ static inline bool ieee80211_mle_size_ok(const u8 *data, size_t len)
bool check_common_len = false;
u16 control;
- if (len < fixed)
+ if (!data || len < fixed)
return false;
control = le16_to_cpu(mle->control);