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

Improved NSEC3 hashes parsing error detection

This commit is contained in:
jsteube 2016-11-12 12:50:02 +01:00
parent bf69afce90
commit 5835f0991f
2 changed files with 8 additions and 3 deletions

View File

@ -44,6 +44,7 @@
- Added docs/team.txt
- Replaced some uint macros with enums types
- Improved default hashcat.hcstat
- Improved NSEC3 hashes parsing error detection
* changes v3.00 -> v3.10:

View File

@ -6851,13 +6851,17 @@ int nsec3_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUS
memcpy (salt_buf_pc_ptr, domainbuf_pos, domainbuf_len);
u8 *len_ptr = NULL;
if (salt_buf_pc_ptr[0] != '.') return (PARSER_SALT_VALUE);
for (u32 i = 0; i < domainbuf_len; i++)
u8 *len_ptr = salt_buf_pc_ptr;
*len_ptr = 0;
for (u32 i = 1; i < domainbuf_len; i++)
{
if (salt_buf_pc_ptr[i] == '.')
{
len_ptr = &salt_buf_pc_ptr[i];
len_ptr = salt_buf_pc_ptr + i;
*len_ptr = 0;
}