1
mirror of https://github.com/hashcat/hashcat synced 2024-11-24 14:27:14 +01:00

Added verification of token buffer length when using TOKEN_ATTR_FIXED_LENGTH

This commit is contained in:
Gabriele Gristina 2023-05-13 20:38:56 +02:00
parent 18639745ef
commit 01f20c84f9
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