]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmf.c
Add two missing bitflip state tables. Update .gitignore
[proxmark3-svn] / client / cmdhfmf.c
index 5b4a0b2a401a48ead9d8e7375c3211047a40061b..4cb9577bc59fdfd772921d34685cc2c843aa6b52 100644 (file)
@@ -19,6 +19,7 @@
 #include "cmdmain.h"\r
 #include "cmdhfmfhard.h"\r
 #include "util.h"\r
+#include "util_posix.h"\r
 #include "usb_cmd.h"\r
 #include "ui.h"\r
 #include "mifarehost.h"\r
@@ -970,6 +971,7 @@ int CmdHF14AMfChk(const char *Cmd)
                break;\r
        default:\r
                PrintAndLog("Key type must be A , B or ?");\r
+               free(keyBlock);\r
                return 1;\r
        };\r
        \r
@@ -1120,7 +1122,8 @@ int CmdHF14AMfChk(const char *Cmd)
 }\r
 \r
 void readerAttack(nonces_t ar_resp[], bool setEmulatorMem, bool doStandardAttack) {\r
-       #define ATTACK_KEY_COUNT 8 // keep same as define in iso14443a.c -> Mifare1ksim()\r
+       #define ATTACK_KEY_COUNT 7 // keep same as define in iso14443a.c -> Mifare1ksim()\r
+                                  // cannot be more than 7 or it will overrun c.d.asBytes(512)\r
        uint64_t key = 0;\r
        typedef struct {\r
                        uint64_t keyA;\r
Impressum, Datenschutz