X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/2696349f161d7eb6de967c7d9480cc1b512eecbf..0a0d9a582816e7e9dd3c19baafe4d551991db40c:/client/cmdhfmf.c diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index a4986f6b..1b815326 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -1202,7 +1202,7 @@ int CmdHF14AMfELoad(const char *Cmd) if (len > FILE_PATH_SIZE) len = FILE_PATH_SIZE; - fnameptr += len; + fnameptr += len-4; sprintf(fnameptr, ".eml"); @@ -1593,6 +1593,7 @@ int CmdHF14AMfCLoad(const char *Cmd) if (fgets(buf, sizeof(buf), f) == NULL) { PrintAndLog("File reading error."); + fclose(f); return 2; } @@ -1600,6 +1601,7 @@ int CmdHF14AMfCLoad(const char *Cmd) if(strlen(buf) && feof(f)) break; PrintAndLog("File content error. Block data must include 32 HEX symbols"); + fclose(f); return 2; } for (i = 0; i < 32; i += 2)