1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-24 15:38:11 +00:00

Fix salt length limit checks for OPTS_TYPE_ST_BASE64 in generic_salt_decode

This commit is contained in:
jsteube 2019-02-27 09:25:50 +01:00
parent 8f38bb9172
commit 85f0516e81

View File

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