aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer/eap_sim.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-05-03 08:18:31 (GMT)
committerJouni Malinen <j@w1.fi>2015-05-03 13:33:03 (GMT)
commitff4a6d4382d399a6bdfad24d75105b8fc1481387 (patch)
tree63097c11c14d21bb5cc8c8825313cae9dd56e80b /src/eap_peer/eap_sim.c
parentf0174bff85c6d7d4f43498d401bff3faef74371f (diff)
downloadhostap-ff4a6d4382d399a6bdfad24d75105b8fc1481387.zip
hostap-ff4a6d4382d399a6bdfad24d75105b8fc1481387.tar.gz
hostap-ff4a6d4382d399a6bdfad24d75105b8fc1481387.tar.bz2
EAP-SIM/AKA: Explicitly check for header to include Reserved field
This was previously checked as part of the eap_sim_parse_attr() processing, but it is easier to review the code if there is an additional explicit check for confirming that the Reserved field is present since the pos variable is advanced beyond it. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/eap_peer/eap_sim.c')
-rw-r--r--src/eap_peer/eap_sim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eap_peer/eap_sim.c b/src/eap_peer/eap_sim.c
index bd06df7..99a2816 100644
--- a/src/eap_peer/eap_sim.c
+++ b/src/eap_peer/eap_sim.c
@@ -1042,7 +1042,7 @@ static struct wpabuf * eap_sim_process(struct eap_sm *sm, void *priv,
}
pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_SIM, reqData, &len);
- if (pos == NULL || len < 1) {
+ if (pos == NULL || len < 3) {
ret->ignore = TRUE;
return NULL;
}