X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/f7c30d806c392836885807d8c28be58c82d27c10..a4295106470f985007687516d77caa298b434dab:/client/cmdhficlass.c diff --git a/client/cmdhficlass.c b/client/cmdhficlass.c index 047bf137..03e99899 100644 --- a/client/cmdhficlass.c +++ b/client/cmdhficlass.c @@ -34,8 +34,6 @@ #include "cmdhfmfu.h" #include "cmdhf.h" -#define llX PRIx64 - static int CmdHelp(const char *Cmd); #define ICLASS_KEYS_MAX 8 @@ -943,7 +941,7 @@ int usage_hf_iclass_clone(void) { } int CmdHFiClassCloneTag(const char *Cmd) { - char filename[FILE_PATH_SIZE]; + char filename[FILE_PATH_SIZE] = { 0x00 }; char tempStr[50]={0}; uint8_t KEY[8]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; uint8_t keyNbr = 0; @@ -1048,6 +1046,7 @@ int CmdHFiClassCloneTag(const char *Cmd) { if (startblock<5) { PrintAndLog("You cannot write key blocks this way. yet... make your start block > 4"); + fclose(f); return 0; } // now read data from the file from block 6 --- 19