aboutsummaryrefslogtreecommitdiffstats
path: root/src/eapol_auth/eapol_auth_sm.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2011-08-12 08:56:44 (GMT)
committerJouni Malinen <j@w1.fi>2011-08-12 08:56:44 (GMT)
commitde6e463f579faa568b751fea01b751f0c6f6afb3 (patch)
tree91910886bd74963df971c43ac7a9dd1c46b883ad /src/eapol_auth/eapol_auth_sm.c
parent167dc97501ae288af4870ef148004db4c4c3821c (diff)
downloadhostap-de6e463f579faa568b751fea01b751f0c6f6afb3.zip
hostap-de6e463f579faa568b751fea01b751f0c6f6afb3.tar.gz
hostap-de6e463f579faa568b751fea01b751f0c6f6afb3.tar.bz2
Make sure that EAP callbacks are not done if state machine has been removed
It is possible to get a response for a pending EAP callback after the EAP state machine has already completed its work or has timed out. For those cases, make sure that the callback function is not delivered since it could result in NULL pointer dereferences.
Diffstat (limited to 'src/eapol_auth/eapol_auth_sm.c')
-rw-r--r--src/eapol_auth/eapol_auth_sm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eapol_auth/eapol_auth_sm.c b/src/eapol_auth/eapol_auth_sm.c
index 4aa71ad..e600954 100644
--- a/src/eapol_auth/eapol_auth_sm.c
+++ b/src/eapol_auth/eapol_auth_sm.c
@@ -1017,7 +1017,7 @@ static struct eapol_callbacks eapol_cb =
int eapol_auth_eap_pending_cb(struct eapol_state_machine *sm, void *ctx)
{
- if (sm == NULL || ctx != sm->eap)
+ if (sm == NULL || ctx == NULL || ctx != sm->eap)
return -1;
eap_sm_pending_cb(sm->eap);