From 01e87ef64ffcf6358241fbde14c689c80d55f183 Mon Sep 17 00:00:00 2001 From: Eduardo Abinader Date: Fri, 1 May 2015 10:14:16 -0400 Subject: [PATCH] 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 --- wpa_supplicant/ibss_rsn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wpa_supplicant/ibss_rsn.c b/wpa_supplicant/ibss_rsn.c index d0ae135bd..6299191dd 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)