aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wps_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-07-15 11:21:50 (GMT)
committerJouni Malinen <j@w1.fi>2011-07-15 11:21:50 (GMT)
commitd87e90b646aa9c63d334f3b48dcdc60dc13ed96e (patch)
tree2087b1ca5f7a4d1e95858e75e30ec95753af532b /wpa_supplicant/wps_supplicant.c
parent21fe9e757e5f9e793662ebf319711224e6329ec1 (diff)
downloadhostap-d87e90b646aa9c63d334f3b48dcdc60dc13ed96e.zip
hostap-d87e90b646aa9c63d334f3b48dcdc60dc13ed96e.tar.gz
hostap-d87e90b646aa9c63d334f3b48dcdc60dc13ed96e.tar.bz2
WPS: Check malloc success on workaround path
ssid->ssid could be NULL here if malloc failed, so better check that consistently.
Diffstat (limited to 'wpa_supplicant/wps_supplicant.c')
-rw-r--r--wpa_supplicant/wps_supplicant.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index e3388bd..6f70cad 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -127,6 +127,8 @@ static void wpas_wps_security_workaround(struct wpa_supplicant *wpa_s,
if (wpa_drv_get_capa(wpa_s, &capa))
return; /* Unknown what driver supports */
+ if (ssid->ssid == NULL)
+ return;
bss = wpa_bss_get(wpa_s, cred->mac_addr, ssid->ssid, ssid->ssid_len);
if (bss == NULL) {
wpa_printf(MSG_DEBUG, "WPS: The AP was not found from BSS "