1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-23 00:28:11 +00:00

Fix this evil bug, pw->i is u32, not u8

This commit is contained in:
Jens Steube 2016-02-23 21:24:03 +01:00
parent b50637b26e
commit 531f72c905

View File

@ -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; 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; pw->pw_len = pw_len;