aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hlr_auc_gw.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-09-29 15:47:26 (GMT)
committerJouni Malinen <j@w1.fi>2013-09-29 15:47:26 (GMT)
commit77e3094bb73d9765461e3cc0480ae449f275daff (patch)
treec4bb90493f27c7ccfd3375d86b39d7a0eef84a6b /hostapd/hlr_auc_gw.c
parent3e6547b5e8195bb668acefed68e741a6bfed9c86 (diff)
downloadhostap-77e3094bb73d9765461e3cc0480ae449f275daff.zip
hostap-77e3094bb73d9765461e3cc0480ae449f275daff.tar.gz
hostap-77e3094bb73d9765461e3cc0480ae449f275daff.tar.bz2
hlr_auc_gw: Fix max_chal value validation
This was supposed to be at maximum EAP_SIM_MAX_CHAL (3). Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hostapd/hlr_auc_gw.c')
-rw-r--r--hostapd/hlr_auc_gw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hostapd/hlr_auc_gw.c b/hostapd/hlr_auc_gw.c
index e79fc5f..2e61ac3 100644
--- a/hostapd/hlr_auc_gw.c
+++ b/hostapd/hlr_auc_gw.c
@@ -633,7 +633,7 @@ static int sim_req_auth(char *imsi, char *resp, size_t resp_len)
if (pos) {
*pos++ = '\0';
max_chal = atoi(pos);
- if (max_chal < 1 || max_chal < EAP_SIM_MAX_CHAL)
+ if (max_chal < 1 || max_chal > EAP_SIM_MAX_CHAL)
max_chal = EAP_SIM_MAX_CHAL;
} else
max_chal = EAP_SIM_MAX_CHAL;