From: Jouni Malinen Date: Sat, 27 Mar 2010 06:26:24 +0000 (-0700) Subject: Fix wpa_auth_iface_iter() to skip BSSes without Authenticator X-Git-Tag: hostap_0_7_2~125 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=03bcb0af0d4209f41a8563c60ad6168ae70c53ff;p=thirdparty%2Fhostap.git 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. --- diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c index df0415db0..998aa768b 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;