Search Linux Wireless

[PATCH] net: mwifiex: fix a missing check of ssid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sme->ssid may be invalid and thus should be checked.

The fix adds such a check and returns an error if it is invalid.

Signed-off-by: Kangjie Lu <kjlu@xxxxxxx>
---
 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index c46f0a54a0c7..a46820cf609f 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -2343,6 +2343,12 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
 	struct mwifiex_adapter *adapter = priv->adapter;
 	int ret;
 
+	if (!sme->ssid) {
+		mwifiex_dbg(adapter, ERROR,
+			    "%s: Invalid ssid\n", dev->name);
+		return -EOPNOTSUPP;
+	}
+
 	if (GET_BSS_ROLE(priv) != MWIFIEX_BSS_ROLE_STA) {
 		mwifiex_dbg(adapter, ERROR,
 			    "%s: reject infra assoc request in non-STA role\n",
-- 
2.17.1




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux