From 806f6f8015910c06f5604abe6cb05eee5e603561 Mon Sep 17 00:00:00 2001
From: ChouTatsumi <choutatsumi@gmail.com>
Date: Sat, 25 May 2019 16:47:06 +1000
Subject: [PATCH] argc 3 mode bug fix

---
 .gitignore | 3 ++-
 crack.c    | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index c1e9f66..ca88a6b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,5 @@
 **/test.*
 **/*.exe
 **/*.o
-**/cheat
\ No newline at end of file
+**/cheat
+**/testguess
\ No newline at end of file
diff --git a/crack.c b/crack.c
index 1b61a08..cbffd2b 100644
--- a/crack.c
+++ b/crack.c
@@ -285,7 +285,7 @@ int main(int argc, char** argv) {
                 exit(0);
             }
 
-            strcpy((char*)&pwd[i], (char*)&buffer);
+            memcpy(pwd[i], buffer, SHA256_BLOCK_SIZE);
         }
         fclose(fp);
 
-- 
GitLab