From: Jouni Malinen Date: Sun, 29 Sep 2013 15:47:26 +0000 (+0300) Subject: hlr_auc_gw: Fix max_chal value validation X-Git-Tag: hostap_2_1~886 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=77e3094bb73d9765461e3cc0480ae449f275daff;p=thirdparty%2Fhostap.git hlr_auc_gw: Fix max_chal value validation This was supposed to be at maximum EAP_SIM_MAX_CHAL (3). Signed-hostap: Jouni Malinen --- diff --git a/hostapd/hlr_auc_gw.c b/hostapd/hlr_auc_gw.c index e79fc5fa0..2e61ac390 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;