]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP2: Fix dot1x config object parsing without trustedEapServerName
authorJouni Malinen <jouni@codeaurora.org>
Thu, 18 Jun 2020 21:10:51 +0000 (00:10 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 18 Jun 2020 21:13:48 +0000 (00:13 +0300)
Need to check that the JSON node was found before using its value.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/common/dpp.c

index 2cf1f6a1351211a76ff1cbd1efe77c0a8983d4b6..de8a4a4ad24b4ad272f1356a91aba01f343c1850 100644 (file)
@@ -2562,7 +2562,7 @@ static int dpp_parse_cred_dot1x(struct dpp_authentication *auth,
                              "Invalid trustedEapServerName type in JSON");
                return -1;
        }
-       if (name->string) {
+       if (name && name->string) {
                wpa_printf(MSG_DEBUG, "DPP: Received trustedEapServerName: %s",
                           name->string);
                conf->server_name = os_strdup(name->string);