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

Merge pull request #3726 from matrix/fix_tokenizer_ATTR_FIXED_LEN

Added verification of token buffer length when using TOKEN_ATTR_FIXED_LENGTH
This commit is contained in:
Jens Steube 2023-05-18 20:29:48 +02:00 committed by GitHub
commit 939a97d145
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -58,6 +58,7 @@
- Fixed bug in 29600 module OPTS_TYPE setting
- Fixed bug in grep out-of-memory workaround on Unit Test
- Fixed bug in input_tokenizer when TOKEN_ATTR_FIXED_LENGTH is used and refactor modules
- Added verification of token buffer length when using TOKEN_ATTR_FIXED_LENGTH
- Fixed build failed for 4410 with vector width > 1
- Fixed build failed for 18400 with Apple Metal
- Fixed build failed for 18600 with Apple Metal

View File

@ -1190,6 +1190,11 @@ int input_tokenizer (const u8 *input_buf, const int input_len, hc_token_t *token
const int len = next_pos - token->buf[token_idx];
if (token->attr[token_idx] & TOKEN_ATTR_FIXED_LENGTH)
{
if (len != token->len[token_idx]) return (PARSER_TOKEN_LENGTH);
}
token->len[token_idx] = len;
token->buf[token_idx + 1] = next_pos + 1; // +1 = separator