From: Alan T. DeKok Date: Thu, 6 Sep 2012 09:00:26 +0000 (+0200) Subject: Fix possible bug X-Git-Tag: release_2_2_0~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd17d5579225d10d311ddbf8ac82d59c3c0b922f;p=thirdparty%2Ffreeradius-server.git Fix possible bug --- diff --git a/src/modules/rlm_otp/otp_pw_valid.c b/src/modules/rlm_otp/otp_pw_valid.c index 271d3e17461..4917a86d603 100644 --- a/src/modules/rlm_otp/otp_pw_valid.c +++ b/src/modules/rlm_otp/otp_pw_valid.c @@ -104,7 +104,7 @@ otp_pw_valid(REQUEST *request, int pwe, const char *challenge, */ switch (otp_request.pwe.pwe) { case PWE_PAP: - if (rvp->length > OTP_MAX_PASSCODE_LEN) { + if (rvp->length >= sizeof(otp_request.pwe.u.pap.passcode)) { (void) radlog(L_AUTH, "rlm_otp: passcode for [%s] too long", username); return RLM_MODULE_REJECT; }