aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2018-11-25 11:33:39 (GMT)
committerJouni Malinen <j@w1.fi>2018-11-25 11:33:39 (GMT)
commit931f7ff656096abcf5c992c04716a6203589b3d5 (patch)
treea2074fdcab74bd7fdc6abcc53d06a53e85761c2b
parente18b479299217379e4cba0ba46e3c83ce0e5d55d (diff)
downloadhostap-931f7ff656096abcf5c992c04716a6203589b3d5.zip
hostap-931f7ff656096abcf5c992c04716a6203589b3d5.tar.gz
hostap-931f7ff656096abcf5c992c04716a6203589b3d5.tar.bz2
DPP: Fix GAS client error case handling
The GAS client processing of the response callback for DPP did not properly check for GAS query success. This could result in trying to check the Advertisement Protocol information in failure cases where that information is not available and that would have resulted in dereferencing a NULL pointer. Fix this by checking the GAS query result before processing with processing of the response. Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--wpa_supplicant/dpp_supplicant.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index 899c4c2..f8e2c83 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -1346,7 +1346,8 @@ static void wpas_dpp_gas_resp_cb(void *ctx, const u8 *addr, u8 dialog_token,
wpa_printf(MSG_DEBUG, "DPP: No matching exchange in progress");
return;
}
- if (!resp || status_code != WLAN_STATUS_SUCCESS) {
+ if (result != GAS_QUERY_SUCCESS ||
+ !resp || status_code != WLAN_STATUS_SUCCESS) {
wpa_printf(MSG_DEBUG, "DPP: GAS query did not succeed");
goto fail;
}