1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-08-01 11:28:08 +00:00

Fixed a division by zero bug in fast hashes caused by hashes->st_salts_buf->salt_iter not being used.

This commit is contained in:
Jens Steube 2025-06-28 07:04:44 +02:00
parent d5050d1f32
commit 7fff4c929a

View File

@ -336,6 +336,10 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
{
u32 start = kernel_loops_max;
const u32 salt_iter = hashes->st_salts_buf->salt_iter;
if (salt_iter)
{
start = MIN (start, smallest_repeat_double (hashes->st_salts_buf->salt_iter));
start = MIN (start, smallest_repeat_double (hashes->st_salts_buf->salt_iter + 1));
@ -347,6 +351,7 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
kernel_loops_min_start = start;
}
}
}
for (u32 kernel_loops_test = kernel_loops_min_start; kernel_loops_test <= kernel_loops_max; kernel_loops_test <<= 1)
{
@ -621,3 +626,4 @@ HC_API_CALL void *thread_autotune (void *p)
return NULL;
}