aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer/eap_fast.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-03-02 13:16:45 (GMT)
committerJouni Malinen <j@w1.fi>2014-03-02 15:15:12 (GMT)
commit3ff8073db7846f643f57323c7c66d5ad68629110 (patch)
treed770c2bec17dc3d128a82af5c8fa2742e74e13c5 /src/eap_peer/eap_fast.c
parenta8716d13bfba9345d05b6078dfff018371587d16 (diff)
downloadhostap-3ff8073db7846f643f57323c7c66d5ad68629110.zip
hostap-3ff8073db7846f643f57323c7c66d5ad68629110.tar.gz
hostap-3ff8073db7846f643f57323c7c66d5ad68629110.tar.bz2
EAP-FAST: Use clear eap_get_config() result validation
This was previously checked through the eap_peer_tls_ssl_init() call which made it difficult for static analyzers. Add an explicit check for config == NULL into the beginnign of eap_fast_init() since this will always result in initialization failing anyway. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/eap_peer/eap_fast.c')
-rw-r--r--src/eap_peer/eap_fast.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/eap_peer/eap_fast.c b/src/eap_peer/eap_fast.c
index 1b0c562..cc1f264 100644
--- a/src/eap_peer/eap_fast.c
+++ b/src/eap_peer/eap_fast.c
@@ -149,14 +149,16 @@ static void * eap_fast_init(struct eap_sm *sm)
struct eap_fast_data *data;
struct eap_peer_config *config = eap_get_config(sm);
+ if (config == NULL)
+ return NULL;
+
data = os_zalloc(sizeof(*data));
if (data == NULL)
return NULL;
data->fast_version = EAP_FAST_VERSION;
data->max_pac_list_len = 10;
- if (config && config->phase1 &&
- eap_fast_parse_phase1(data, config->phase1) < 0) {
+ if (config->phase1 && eap_fast_parse_phase1(data, config->phase1) < 0) {
eap_fast_deinit(sm, data);
return NULL;
}