X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/60daed79dbd2fd4da6e60d4e8dd50914075ff212..6178e80e4a1d86d0633226cf4f9c244f968d3925:/client/cmdhfmf.c diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index abc88b86..267f323c 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -988,6 +988,7 @@ int CmdHF14AMfChk(const char *Cmd) break; default: PrintAndLog("Key type must be A , B or ?"); + free(keyBlock); return 1; }; @@ -1039,6 +1040,7 @@ int CmdHF14AMfChk(const char *Cmd) if (!p) { PrintAndLog("Cannot allocate memory for defKeys"); free(keyBlock); + free(f); return 2; } keyBlock = p; @@ -1224,10 +1226,10 @@ int CmdHF14AMf1kSim(const char *Cmd) corr_uid |= (uint64_t)data[2] << 48; corr_uid |= (uint64_t)data[1] << 40; corr_uid |= (uint64_t)data[0] << 32; - corr_uid |= data[7] << 24; - corr_uid |= data[6] << 16; - corr_uid |= data[5] << 8; - corr_uid |= data[4]; + corr_uid |= (uint64_t)data[7] << 24; + corr_uid |= (uint64_t)data[6] << 16; + corr_uid |= (uint64_t)data[5] << 8; + corr_uid |= (uint64_t)data[4]; tryMfk64(corr_uid, data, key); } PrintAndLog("--");