1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-22 21:51:07 +00:00

Merge pull request #1091 from philsmd/master

minor: within parse_and_store_salt () do the initialization of the buffer @ start
This commit is contained in:
Jens Steube 2017-02-14 19:33:27 +01:00 committed by GitHub
commit afa3326330

View File

@ -2041,6 +2041,8 @@ static u32 parse_and_store_salt (u8 *out, u8 *in, u32 salt_len, MAYBE_UNUSED con
return UINT_MAX;
}
memset (tmp, 0, sizeof (tmp_u32));
memcpy (tmp, in, salt_len);
if (hashconfig->opts_type & OPTS_TYPE_ST_HEX)
@ -2070,8 +2072,6 @@ static u32 parse_and_store_salt (u8 *out, u8 *in, u32 salt_len, MAYBE_UNUSED con
salt_len = base64_decode (base64_to_int, (const u8 *) in, salt_len, (u8 *) tmp);
}
memset (tmp + salt_len, 0, sizeof (tmp_u32) - salt_len);
if (hashconfig->opts_type & OPTS_TYPE_ST_UNICODE)
{
if (salt_len < 20)