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>
This commit is contained in:
Jouni Malinen 2013-09-29 18:47:26 +03:00
parent 3e6547b5e8
commit 77e3094bb7

View file

@ -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;