瀏覽代碼

fix for issue #37: clear buffers when approaching the final number of password candidates

philsmd 10 年之前
父節點
當前提交
aff4f49ca5
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      src/engine.c

+ 7 - 0
src/engine.c

@@ -15554,6 +15554,13 @@ void *attack_a5r0 (thread_parameter_t *thread_parameter)
         memset (ptrs[j] + plains[j].len, 0, BLOCK_SIZE - plains[j].len);
       }
 
+      for (; j < 4; j++)
+      {
+        memset (ptrs[j], 0, BLOCK_SIZE);
+
+        plains[j].len = 0;
+      }
+
       thread_parameter->hashing (thread_parameter, plains);
 
       thread_parameter->thread_plains_done += left;