aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer/eap_fast.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-12-12 09:12:32 (GMT)
committerJouni Malinen <j@w1.fi>2015-12-12 09:12:32 (GMT)
commitb1d8c5ce6a60111e94fa9b8720acb362fe04f608 (patch)
tree2faa5a9300edd9e4de3ae67167f8c41d8b45d030 /src/eap_peer/eap_fast.c
parent36478a16e622059b71337570e089f932e299358b (diff)
downloadhostap-b1d8c5ce6a60111e94fa9b8720acb362fe04f608.zip
hostap-b1d8c5ce6a60111e94fa9b8720acb362fe04f608.tar.gz
hostap-b1d8c5ce6a60111e94fa9b8720acb362fe04f608.tar.bz2
EAP-FAST peer: Fix error path handling for Session-Id
It was possible to hit a NULL pointer dereference if Session-Id derivation failed due to a memory allocation failure. 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eap_peer/eap_fast.c b/src/eap_peer/eap_fast.c
index 833dcb6..6e8b12f 100644
--- a/src/eap_peer/eap_fast.c
+++ b/src/eap_peer/eap_fast.c
@@ -1721,7 +1721,7 @@ static u8 * eap_fast_get_session_id(struct eap_sm *sm, void *priv, size_t *len)
struct eap_fast_data *data = priv;
u8 *id;
- if (!data->success)
+ if (!data->success || !data->session_id)
return NULL;
id = os_malloc(data->id_len);