From: Ben Greear Date: Sun, 3 Feb 2013 11:51:54 +0000 (+0200) Subject: hostapd: Fix crash when scan fails X-Git-Tag: aosp-kk-from-upstream~617 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=085b29f1fee518921c271f4ba48e54ce24dde38e;p=thirdparty%2Fhostap.git hostapd: Fix crash when scan fails When scan failed, the wpa_driver_nl80211_scan method tried to recursively call itself, but it passed in the wrong argument for the void*, and so then it crashed accessing bad memory. With this fix, hostapd still will not retry the scan later, but at least it will exit cleanly and won't polute the file system with core files. Signed-off-by: Ben Greear --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 6d2ed2831..f20e94812 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -3719,7 +3719,7 @@ static int wpa_driver_nl80211_scan(void *priv, bss, NL80211_IFTYPE_STATION)) goto nla_put_failure; - if (wpa_driver_nl80211_scan(drv, params)) { + if (wpa_driver_nl80211_scan(bss, params)) { wpa_driver_nl80211_set_mode(bss, drv->nlmode); goto nla_put_failure; }