mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-22 16:18:09 +00:00
Fix this evil bug, pw->i is u32, not u8
This commit is contained in:
parent
b50637b26e
commit
531f72c905
@ -4302,9 +4302,11 @@ static void pw_add (hc_device_param_t *device_param, const u8 *pw_buf, const int
|
||||
{
|
||||
pw_t *pw = (pw_t *) device_param->pws_buf + device_param->pws_cnt;
|
||||
|
||||
memcpy (pw->i, pw_buf, pw_len);
|
||||
u8 *ptr = (u8 *) pw->i;
|
||||
|
||||
memset (pw->i + pw_len, 0, sizeof (pw->i) - pw_len);
|
||||
memcpy (ptr, pw_buf, pw_len);
|
||||
|
||||
memset (ptr + pw_len, 0, sizeof (pw->i) - pw_len);
|
||||
|
||||
pw->pw_len = pw_len;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user