diff --git a/src/shared.c b/src/shared.c index dfdbfb8eb..f58549dee 100644 --- a/src/shared.c +++ b/src/shared.c @@ -1143,8 +1143,8 @@ bool generic_salt_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, const u8 } else if (hashconfig->opts_type & OPTS_TYPE_ST_BASE64) { - if (in_len < (int) ((hashconfig->salt_min * 8) / 6)) return false; - if (in_len > (int) ((hashconfig->salt_max * 8) / 6)) return false; + if (in_len < (int) (((hashconfig->salt_min * 8) / 6) + 0)) return false; + if (in_len > (int) (((hashconfig->salt_max * 8) / 6) + 3)) return false; tmp_len = base64_decode (base64_to_int, (const u8 *) in_buf, in_len, tmp_u8); }