wifi: mac80211: Fix potential he_6ghz_oper NULL pointer access
Subsystems (2)
PATCH 1/1 wifi: mac80211: Fix potential he_6ghz_oper NULL pointer access
Signed-off-by Michael-CY Lee <[email protected]>
--- include/linux/ieee80211.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
include/linux/ieee80211.h +3 -1
@@ -2671,12 +2671,14 @@ ieee80211_he_oper_size(const u8 *he_oper_ie)static inline const struct ieee80211_he_6ghz_oper *ieee80211_he_6ghz_oper (const struct ieee80211_he_operation *he_oper) { -const u8 *ret = (const void *)&he_oper->optional; +const u8 *ret;u32 he_oper_params;if (!he_oper)return NULL ; + ret = (const void *)&he_oper->optional; + he_oper_params =le32_to_cpu (he_oper->he_oper_params);if (!(he_oper_params &IEEE80211_HE_OPERATION_6GHZ_OP_INFO ))
Signature · 1 line
2.25.1