mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 18:59:22 +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:
parent
8f09a0c937
commit
6017dc5730
@ -1082,6 +1082,8 @@ static bool eap_ttls_settings_load(struct eap_state *eap,
|
|||||||
snprintf(setting, sizeof(setting), "%sTTLS-Phase2-Method", prefix);
|
snprintf(setting, sizeof(setting), "%sTTLS-Phase2-Method", prefix);
|
||||||
phase2_method_name = l_settings_get_value(settings, "Security",
|
phase2_method_name = l_settings_get_value(settings, "Security",
|
||||||
setting);
|
setting);
|
||||||
|
if (!phase2_method_name)
|
||||||
|
return false;
|
||||||
|
|
||||||
snprintf(setting, sizeof(setting), "%sTTLS-Phase2-", prefix);
|
snprintf(setting, sizeof(setting), "%sTTLS-Phase2-", prefix);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user