3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-27 19:22:34 +01:00

eap-ttls: Check phase2-method is non-NULL in load_settings

Even though .check_settings in our EAP method implementations does the
settings validation, .load_settings also has minimum sanity checks to
rule out segfaults if the settings have changed since the last
.check_settings call.
This commit is contained in:
Andrew Zaborowski 2019-02-28 18:47:59 +01:00 committed by Denis Kenzior
parent 8f09a0c937
commit 6017dc5730

View File

@ -1082,6 +1082,8 @@ static bool eap_ttls_settings_load(struct eap_state *eap,
snprintf(setting, sizeof(setting), "%sTTLS-Phase2-Method", prefix);
phase2_method_name = l_settings_get_value(settings, "Security",
setting);
if (!phase2_method_name)
return false;
snprintf(setting, sizeof(setting), "%sTTLS-Phase2-", prefix);