]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP2: Fix DPP_CA_SET processing with authentication not having peer BI
authorJouni Malinen <jouni@codeaurora.org>
Mon, 22 Jun 2020 18:45:10 +0000 (21:45 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 22 Jun 2020 18:45:10 +0000 (21:45 +0300)
Need to check for auth->peer_bi being set before using it here.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/dpp_supplicant.c

index 0cda385424240af5467f065402ae0e8b651bba3b..801e372bbe027fd369febaf2d1f8d622e0e51dd4 100644 (file)
@@ -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;
                }