aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/interworking.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-12-17 10:12:13 (GMT)
committerJouni Malinen <j@w1.fi>2012-12-17 10:12:13 (GMT)
commit953d25ca5f3a4df70ca492bdd4f9059ea557e1b6 (patch)
tree28c77c220d55ffa79fe34bc52708fb06abe924d8 /wpa_supplicant/interworking.c
parent0a66ce3c49db7425b8cdd253e1ee381073970689 (diff)
downloadhostap-953d25ca5f3a4df70ca492bdd4f9059ea557e1b6.zip
hostap-953d25ca5f3a4df70ca492bdd4f9059ea557e1b6.tar.gz
hostap-953d25ca5f3a4df70ca492bdd4f9059ea557e1b6.tar.bz2
HS 2.0: Fix sp_type check in ctrl_iface status command
Commit e99b4f3a14755473d6d0e2413de6d82e785a6a30 added functionality to check whether the current association is with the home SP. This commit did not take into account that the domain name ANQP information could be NULL and that could result to a NULL pointer dereference. Fix that by validation that domain_names != NULL before calling domain_name_list_contains(). Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/interworking.c')
-rw-r--r--wpa_supplicant/interworking.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c
index 0572556..64d6ae0 100644
--- a/wpa_supplicant/interworking.c
+++ b/wpa_supplicant/interworking.c
@@ -1490,7 +1490,8 @@ int interworking_home_sp_cred(struct wpa_supplicant *wpa_s,
mnc_len = wpa_s->mnc_len;
}
#endif /* CONFIG_PCSC */
- if (imsi && build_root_nai(nai, sizeof(nai), imsi, mnc_len, 0) == 0) {
+ if (domain_names &&
+ imsi && build_root_nai(nai, sizeof(nai), imsi, mnc_len, 0) == 0) {
realm = os_strchr(nai, '@');
if (realm)
realm++;
@@ -1502,7 +1503,7 @@ int interworking_home_sp_cred(struct wpa_supplicant *wpa_s,
}
#endif /* INTERWORKING_3GPP */
- if (cred->domain == NULL)
+ if (domain_names == NULL || cred->domain == NULL)
return 0;
wpa_printf(MSG_DEBUG, "Interworking: Search for match with "