X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/2696349f161d7eb6de967c7d9480cc1b512eecbf..ce432659f2b238ecaced79ae6fa520750690146c:/client/cmdhfmf.c diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index a4986f6b..676a8884 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"); @@ -1592,7 +1592,9 @@ int CmdHF14AMfCLoad(const char *Cmd) memset(buf, 0, sizeof(buf)); if (fgets(buf, sizeof(buf), f) == NULL) { + fclose(f); PrintAndLog("File reading error."); + fclose(f); return 2; } @@ -1600,6 +1602,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)