Fixed checking the length of the last token in a hash if it was given the attribute TOKEN_ATTR_FIXED_LENGTH

Fixes https://github.com/hashcat/hashcat/issues/1755
This commit is contained in:
Jens Steube
2018-11-04 09:41:07 +01:00
parent c804d79eb8
commit 399bd2562a
2 changed files with 12 additions and 1 deletions

View File

@@ -2556,7 +2556,16 @@ static int input_tokenizer (u8 *input_buf, int input_len, token_t *token)
}
}
token->len[token_idx] = len_left;
if (token->attr[token_idx] & TOKEN_ATTR_FIXED_LENGTH)
{
int len = token->len[token_idx];
if (len_left != len) return (PARSER_TOKEN_LENGTH);
}
else
{
token->len[token_idx] = len_left;
}
// verify data