mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-22 13:40:56 +00:00
Fixed out-of-boundary write in slow candidates mode in combinator attack update
This commit is contained in:
parent
1a4758da83
commit
84cf5e70e7
@ -315,14 +315,18 @@ void slow_candidates_next (hashcat_ctx_t *hashcat_ctx, void *extra_info)
|
||||
|
||||
// this can overflow so we move it up
|
||||
|
||||
extra_info_combi->out_len += line_len;
|
||||
|
||||
if (extra_info_combi->out_len <= sizeof (extra_info_combi->out_buf))
|
||||
if ((extra_info_combi->out_len + line_len) <= sizeof (extra_info_combi->out_buf))
|
||||
{
|
||||
memcpy (extra_info_combi->out_buf + extra_info_combi->out_len, line_buf, line_len);
|
||||
|
||||
extra_info_combi->out_len += line_len;
|
||||
|
||||
memset (extra_info_combi->out_buf + extra_info_combi->out_len, 0, sizeof (extra_info_combi->out_buf) - extra_info_combi->out_len);
|
||||
}
|
||||
else
|
||||
{
|
||||
extra_info_combi->out_len += line_len;
|
||||
}
|
||||
|
||||
extra_info_combi->comb_pos_prev = extra_info_combi->comb_pos;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user