commit 6017dc5730df245e5ae1b5cb2b7dadc987ef21a8
parent 8f09a0c9370575a760e5714ec0634b8fdd77fde6
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date: Thu, 28 Feb 2019 18:47:59 +0100
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.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/eap-ttls.c b/src/eap-ttls.c
@@ -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);