Subject: fix null point in ar6k_cfg80211_connect
driver crash when use iw to connect by null pointer,
the root cause is sme->ie is NULL
add check for ie to make sure valid to use pointer.
Signed-off-by: Nick Shih <Nick_Shih at wistron.com>
diff -ruNa a/drivers/staging/ar6003/os/linux/cfg80211.c
b/drivers/staging/ar6003/os/linux/cfg80211.c
--- a/drivers/staging/ar6003/os/linux/cfg80211.c 2011-07-07
14:53:42.300163064 -0700
+++ b/drivers/staging/ar6003/os/linux/cfg80211.c 2011-07-07
14:57:15.316163163 -0700
@@ -394,7 +394,7 @@
arPriv->arNetworkType = arPriv->arNextMode;
- if (ie[0] == WLAN_EID_VENDOR_SPECIFIC &&
+ if ( ie && ie[0] == WLAN_EID_VENDOR_SPECIFIC &&
memcmp(ie + 2, wps_oui, sizeof(wps_oui)) == 0) {
/* WPS IE detected, notify target */
A_PRINTF("WPS IE detected -- setting WPS flag\n");
_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel