1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-02-22 12:32:04 +00:00

Merge pull request #1102 from philsmd/master

prevent buffer overflow in case of OPTS_TYPE_ST_ADD80 and/or OPTS_TYPE_ST_ADD01
This commit is contained in:
Jens Steube 2017-02-15 11:43:27 +01:00 committed by GitHub
commit ae8f702fef

View File

@ -2109,11 +2109,15 @@ static u32 parse_and_store_salt (u8 *out, u8 *in, u32 salt_len, MAYBE_UNUSED con
if (hashconfig->opts_type & OPTS_TYPE_ST_ADD80)
{
if (len >= 256) return UINT_MAX;
tmp[len++] = 0x80;
}
if (hashconfig->opts_type & OPTS_TYPE_ST_ADD01)
{
if (len >= 256) return UINT_MAX;
tmp[len++] = 0x01;
}