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 <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-06-19 00:10:51 +03:00 committed by Jouni Malinen
parent 8f88dcf050
commit 0bbab64656

View 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);