Skip to contentSkip to conversation

mac80211: avoid null ptr deref in ieee80211_ibss_add_sta

PATCH New John W. Linville 1 participant 1 message May 15, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: avoid null ptr deref in ieee80211_ibss_add_sta

avoid sdata null pointer dereference in ieee80211_ibss_add_sta.

---
 net/mac80211/ieee80211_sta.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/mac80211/ieee80211_sta.c +1 -1
index a36c6f3..dd36cc6 100644
@@ -3154,7 +3154,7 @@ struct sta_info * ieee80211_ibss_add_sta(struct net_device *dev,
 {
 	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
 	struct sta_info *sta;
-	struct ieee80211_sub_if_data *sdata = NULL;
+	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 
 	/* TODO: Could consider removing the least recently used entry and
 	 * allow new one to be added. */
Signature · 5 lines
1.5.0.6

-- 
John W. Linville
[email protected]