From: Jouni Malinen Date: Thu, 18 Jun 2020 21:10:51 +0000 (+0300) Subject: DPP2: Fix dot1x config object parsing without trustedEapServerName X-Git-Tag: hostap_2_10~1124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bbab646563155701f7fa71dc59910aacb254d58;p=thirdparty%2Fhostap.git 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 --- 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);