X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/c2ca50419d360dc80196fba5a4e39c33ef4d1a97..eabbb166f06996c5f8a04166f9a9e934195e85af:/client/cmdhfmf.c diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index 5b4a0b2a..4cb9577b 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -19,6 +19,7 @@ #include "cmdmain.h" #include "cmdhfmfhard.h" #include "util.h" +#include "util_posix.h" #include "usb_cmd.h" #include "ui.h" #include "mifarehost.h" @@ -970,6 +971,7 @@ int CmdHF14AMfChk(const char *Cmd) break; default: PrintAndLog("Key type must be A , B or ?"); + free(keyBlock); return 1; }; @@ -1120,7 +1122,8 @@ int CmdHF14AMfChk(const char *Cmd) } void readerAttack(nonces_t ar_resp[], bool setEmulatorMem, bool doStandardAttack) { - #define ATTACK_KEY_COUNT 8 // keep same as define in iso14443a.c -> Mifare1ksim() + #define ATTACK_KEY_COUNT 7 // keep same as define in iso14443a.c -> Mifare1ksim() + // cannot be more than 7 or it will overrun c.d.asBytes(512) uint64_t key = 0; typedef struct { uint64_t keyA;