aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ibss_rsn.c
diff options
context:
space:
mode:
authorEduardo Abinader <eduardo.abinader@openbossa.org>2015-05-01 14:14:16 (GMT)
committerJouni Malinen <j@w1.fi>2015-05-03 14:15:00 (GMT)
commit01e87ef64ffcf6358241fbde14c689c80d55f183 (patch)
treeb9050f2ff3ac2a8729ccfab01c6ca55baae5d519 /wpa_supplicant/ibss_rsn.c
parent74d912f134984fac1a5d95ed001af1564a1191fc (diff)
downloadhostap-01e87ef64ffcf6358241fbde14c689c80d55f183.zip
hostap-01e87ef64ffcf6358241fbde14c689c80d55f183.tar.gz
hostap-01e87ef64ffcf6358241fbde14c689c80d55f183.tar.bz2
IBSS: Check ibss_rsn init before starting new IBSS authentication
Sanity check added to avoid segmentation fault which occurs, when issuing ibss_rsn ctrl iface cmd and IBSS was not initialized previously via IBSS network selection. Signed-off-by: Eduardo Abinader <eduardo.abinader@openbossa.org>
Diffstat (limited to 'wpa_supplicant/ibss_rsn.c')
-rw-r--r--wpa_supplicant/ibss_rsn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/wpa_supplicant/ibss_rsn.c b/wpa_supplicant/ibss_rsn.c
index d0ae135..6299191 100644
--- a/wpa_supplicant/ibss_rsn.c
+++ b/wpa_supplicant/ibss_rsn.c
@@ -571,6 +571,9 @@ int ibss_rsn_start(struct ibss_rsn *ibss_rsn, const u8 *addr)
struct ibss_rsn_peer *peer;
int res;
+ if (!ibss_rsn)
+ return -1;
+
/* if the peer already exists, exit immediately */
peer = ibss_rsn_get_peer(ibss_rsn, addr);
if (peer)