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>
This commit is contained in:
parent
36478a16e6
commit
b1d8c5ce6a
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
struct eap_fast_data *data = priv;
|
||||||
u8 *id;
|
u8 *id;
|
||||||
|
|
||||||
if (!data->success)
|
if (!data->success || !data->session_id)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
id = os_malloc(data->id_len);
|
id = os_malloc(data->id_len);
|
||||||
|
|
Loading…
Reference in a new issue