From 98abea9a0f393e3ca79785a10790e94fec48f9d1 Mon Sep 17 00:00:00 2001 From: jsteube Date: Thu, 8 Feb 2018 15:41:19 +0100 Subject: [PATCH] Fix one more technical teething trouble with compressor kernels --- src/opencl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/opencl.c b/src/opencl.c index 1d59040d0..99e3e0bae 100644 --- a/src/opencl.c +++ b/src/opencl.c @@ -1158,9 +1158,12 @@ int gidd_to_pw_t (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, c const u32 cnt = pw_idx.cnt; const u32 len = pw_idx.len; - CL_rc = hc_clEnqueueReadBuffer (hashcat_ctx, device_param->command_queue, device_param->d_pws_comp_buf, CL_TRUE, off * sizeof (u32), cnt * sizeof (u32), pw->i, 0, NULL, NULL); + if (cnt > 0) + { + CL_rc = hc_clEnqueueReadBuffer (hashcat_ctx, device_param->command_queue, device_param->d_pws_comp_buf, CL_TRUE, off * sizeof (u32), cnt * sizeof (u32), pw->i, 0, NULL, NULL); - if (CL_rc == -1) return -1; + if (CL_rc == -1) return -1; + } for (u32 i = cnt; i < 64; i++) {