diff --git a/src/hashcat.c b/src/hashcat.c index 66568626e..9b4daac7f 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -15337,6 +15337,10 @@ int main (int argc, char **argv) // now check if all device-memory sizes which depend on the kernel_accel_max amplifier are within its boundaries // if not, decrease amplifier and try again + if (size_pws > device_param->device_maxmem_alloc) skip = 1; + if (size_tmps > device_param->device_maxmem_alloc) skip = 1; + if (size_hooks > device_param->device_maxmem_alloc) skip = 1; + int skip = 0; const u64 size_total @@ -15367,10 +15371,7 @@ int main (int argc, char **argv) + size_tm + size_tmps; - // Don't ask me, ask AMD! - - if (size_total > device_param->device_maxmem_alloc) skip = 1; - if (size_total > device_param->device_global_mem) skip = 1; + if (size_total > device_param->device_global_mem) skip = 1; if (skip == 1) { @@ -15382,14 +15383,12 @@ int main (int argc, char **argv) break; } - /* - if (kernel_accel_max == 0) + if (kernel_accel_max < kernel_accel_min) { - log_error ("- Device #%u: Device does not provide enough allocatable device-memory to handle hash-type %u", device_id + 1, data.hash_mode); + log_error ("- Device #%u: Device does not provide enough allocatable device-memory to handle this attack", device_id + 1); return -1; } - */ device_param->kernel_accel_min = kernel_accel_min; device_param->kernel_accel_max = kernel_accel_max;