aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-03-29 16:59:16 (GMT)
committerJouni Malinen <j@w1.fi>2010-03-29 16:59:16 (GMT)
commita042f8447dc7d89f2aa7db0d95d3987ebfbf3d3a (patch)
treef92c9e09a00dabf9e4bf8ccfd4d86f0f52e394ae
parente2f74005f548d90014cdf080802d455382e37cb9 (diff)
downloadhostap-a042f8447dc7d89f2aa7db0d95d3987ebfbf3d3a.zip
hostap-a042f8447dc7d89f2aa7db0d95d3987ebfbf3d3a.tar.gz
hostap-a042f8447dc7d89f2aa7db0d95d3987ebfbf3d3a.tar.bz2
Fix ctrl_iface get-STA-MIB for WPS disabled case
The previous version would crash here on NULL pointer dereference if WPS was disabled.
-rw-r--r--src/ap/wps_hostapd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ap/wps_hostapd.c b/src/ap/wps_hostapd.c
index d5145f0..cc05813 100644
--- a/src/ap/wps_hostapd.c
+++ b/src/ap/wps_hostapd.c
@@ -894,5 +894,7 @@ static void hostapd_wps_upnp_deinit(struct hostapd_data *hapd)
int hostapd_wps_get_mib_sta(struct hostapd_data *hapd, const u8 *addr,
char *buf, size_t buflen)
{
+ if (hapd->wps == NULL)
+ return 0;
return wps_registrar_get_info(hapd->wps->registrar, addr, buf, buflen);
}