From 0bbab646563155701f7fa71dc59910aacb254d58 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 19 Jun 2020 00:10:51 +0300 Subject: [PATCH] DPP2: Fix dot1x config object parsing without trustedEapServerName Need to check that the JSON node was found before using its value. Signed-off-by: Jouni Malinen --- src/common/dpp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/dpp.c b/src/common/dpp.c index 2cf1f6a13..de8a4a4ad 100644 --- a/src/common/dpp.c +++ b/src/common/dpp.c @@ -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);