Merge remote-tracking branch 'freeradius/v3.0.x' into tr-upgrade
[freeradius.git] / src / modules / rlm_otp / rlm_otp.c
index 971b01c..4523717 100644 (file)
@@ -354,7 +354,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, REQUEST *re
                 *      There are notes in otp_radstate as to why the state
                 *      value is encoded as hexits.
                 */
-               len = fr_hex2bin(bin_state, vp->vp_strvalue, vp->length);
+               len = fr_hex2bin(bin_state, sizeof(bin_state), vp->vp_strvalue, vp->length);
                if (len != (vp->length / 2)) {
                        REDEBUG("bad radstate for [%s]: not hex", username);