Fixed a bug where hashcat reported an invalid password for a zero-length password...
[hashcat.git] / OpenCL / inc_comp_multi_bs.cl
index 6546a97..894416a 100644 (file)
@@ -22,11 +22,14 @@ if (check (digest_tp,
 
   if (digest_pos != -1)
   {
-    const u32 final_hash_pos = digests_offset + digest_pos;
-
-    if (atomic_inc (&hashes_shown[final_hash_pos]) == 0)
+    if ((il_pos + slice) < il_cnt)
     {
-      mark_hash (plains_buf, d_return_buf, salt_pos, digest_pos, final_hash_pos, gid, il_pos + slice);
+      const u32 final_hash_pos = digests_offset + digest_pos;
+
+      if (atomic_inc (&hashes_shown[final_hash_pos]) == 0)
+      {
+        mark_hash (plains_buf, d_return_buf, salt_pos, digest_pos, final_hash_pos, gid, il_pos + slice);
+      }
     }
   }
 }