Sfoglia il codice sorgente

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

philsmd 10 anni fa
parent
commit
aff4f49ca5
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  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;