From: Jouni Malinen Date: Sat, 12 Dec 2015 09:12:32 +0000 (+0200) Subject: EAP-FAST peer: Fix error path handling for Session-Id X-Git-Tag: hostap_2_6~1212 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b1d8c5ce6a60111e94fa9b8720acb362fe04f608;p=thirdparty%2Fhostap.git 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 --- diff --git a/src/eap_peer/eap_fast.c b/src/eap_peer/eap_fast.c index 833dcb6ba..6e8b12fd6 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);