aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mesh_rsn.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-11-30 13:46:09 (GMT)
committerJouni Malinen <j@w1.fi>2014-11-30 13:53:11 (GMT)
commit608b0ff52a9533d067c30cead6ed881bd593e006 (patch)
tree5b822572d555ffce393199fab510f81955c2ce83 /wpa_supplicant/mesh_rsn.c
parentfaa907389b1f0ceaa1f3d2948cef1e45d046d92e (diff)
downloadhostap-608b0ff52a9533d067c30cead6ed881bd593e006.zip
hostap-608b0ff52a9533d067c30cead6ed881bd593e006.tar.gz
hostap-608b0ff52a9533d067c30cead6ed881bd593e006.tar.bz2
mesh: Check for initialization failures
It is possible that these location ended up getting called before mesh startup operations had been completed and that could result in dereferencing NULL pointers. Address those error cases by verifying that the needed parameters are available before using them. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/mesh_rsn.c')
-rw-r--r--wpa_supplicant/mesh_rsn.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/wpa_supplicant/mesh_rsn.c b/wpa_supplicant/mesh_rsn.c
index 4ee3431..8354aad 100644
--- a/wpa_supplicant/mesh_rsn.c
+++ b/wpa_supplicant/mesh_rsn.c
@@ -329,6 +329,12 @@ int mesh_rsn_auth_sae_sta(struct wpa_supplicant *wpa_s,
struct wpabuf *buf;
unsigned int rnd;
+ if (!ssid) {
+ wpa_msg(wpa_s, MSG_DEBUG,
+ "AUTH: No current_ssid known to initiate new SAE");
+ return -1;
+ }
+
if (!sta->sae) {
sta->sae = os_zalloc(sizeof(*sta->sae));
if (sta->sae == NULL)