prevent buffer overflow in case of OPTS_TYPE_ST_ADD80 and/or OPTS_TYPE_ST_ADD01

pull/1102/head
philsmd 8 years ago
parent 8717672d00
commit 02480f906a
No known key found for this signature in database
GPG Key ID: 4F25D016D9D6A8AF

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

Loading…
Cancel
Save