From: Jens Steube Date: Wed, 22 Jun 2016 09:32:40 +0000 (+0200) Subject: Fix invalid error CL_INVALID_VALUE caused by a zero length copy when using large... X-Git-Tag: v3.00~30 X-Git-Url: https://www.flypig.org.uk/git/?p=hashcat.git;a=commitdiff_plain;h=fe18f5140620e8b3dd22de5f85b638eacc28b3a0 Fix invalid error CL_INVALID_VALUE caused by a zero length copy when using large hashlists --- diff --git a/src/hashcat.c b/src/hashcat.c index 6656862..9b4daac 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;