aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/wpa_auth_glue.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-03-27 06:26:24 (GMT)
committerJouni Malinen <j@w1.fi>2010-03-27 06:26:24 (GMT)
commit03bcb0af0d4209f41a8563c60ad6168ae70c53ff (patch)
tree4fbd27219b0dc0c23474388540578c8a9a020f7f /src/ap/wpa_auth_glue.c
parentb766a9a2938b555521b05eecb12685e73b29df1b (diff)
downloadhostap-03bcb0af0d4209f41a8563c60ad6168ae70c53ff.zip
hostap-03bcb0af0d4209f41a8563c60ad6168ae70c53ff.tar.gz
hostap-03bcb0af0d4209f41a8563c60ad6168ae70c53ff.tar.bz2
Fix wpa_auth_iface_iter() to skip BSSes without Authenticator
This could cause NULL pointer deference if multi-BSS configuration was used with OKC in some cases.
Diffstat (limited to 'src/ap/wpa_auth_glue.c')
-rw-r--r--src/ap/wpa_auth_glue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c
index df0415d..998aa76 100644
--- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c
@@ -270,7 +270,8 @@ static int wpa_auth_iface_iter(struct hostapd_iface *iface, void *ctx)
struct wpa_auth_iface_iter_data *data = ctx;
size_t i;
for (i = 0; i < iface->num_bss; i++) {
- if (data->cb(iface->bss[i]->wpa_auth, data->cb_ctx))
+ if (iface->bss[i]->wpa_auth &&
+ data->cb(iface->bss[i]->wpa_auth, data->cb_ctx))
return 1;
}
return 0;