From b62e46f6908bdb627c8d31006dd878fc7a3ffeec Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 22 Jun 2020 21:45:10 +0300 Subject: [PATCH] DPP2: Fix DPP_CA_SET processing with authentication not having peer BI Need to check for auth->peer_bi being set before using it here. Signed-off-by: Jouni Malinen --- wpa_supplicant/dpp_supplicant.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c index 0cda38542..801e372bb 100644 --- a/wpa_supplicant/dpp_supplicant.c +++ b/wpa_supplicant/dpp_supplicant.c @@ -3668,7 +3668,8 @@ int wpas_dpp_ca_set(struct wpa_supplicant *wpa_s, const char *cmd) if (pos) { peer = atoi(pos + 6); if (!auth || !auth->waiting_cert || - (unsigned int) peer != auth->peer_bi->id) { + (auth->peer_bi && + (unsigned int) peer != auth->peer_bi->id)) { auth = dpp_controller_get_auth(wpa_s->dpp, peer); tcp = true; }