]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmf.c
@Marshmellow42 's fixes for bigbuf.
[proxmark3-svn] / client / cmdhfmf.c
index a4986f6bf28ffe591ea568eeaf73882b35df5037..1b815326e13e26f611a169a059702193455f9b83 100644 (file)
@@ -1202,7 +1202,7 @@ int CmdHF14AMfELoad(const char *Cmd)
        \r
        if (len > FILE_PATH_SIZE) len = FILE_PATH_SIZE;\r
 \r
        \r
        if (len > FILE_PATH_SIZE) len = FILE_PATH_SIZE;\r
 \r
-       fnameptr += len;\r
+       fnameptr += len-4;\r
 \r
        sprintf(fnameptr, ".eml"); \r
        \r
 \r
        sprintf(fnameptr, ".eml"); \r
        \r
@@ -1593,6 +1593,7 @@ int CmdHF14AMfCLoad(const char *Cmd)
                        \r
                        if (fgets(buf, sizeof(buf), f) == NULL) {\r
                                PrintAndLog("File reading error.");\r
                        \r
                        if (fgets(buf, sizeof(buf), f) == NULL) {\r
                                PrintAndLog("File reading error.");\r
+                               fclose(f);\r
                                return 2;\r
                        }\r
 \r
                                return 2;\r
                        }\r
 \r
@@ -1600,6 +1601,7 @@ int CmdHF14AMfCLoad(const char *Cmd)
                                if(strlen(buf) && feof(f))\r
                                        break;\r
                                PrintAndLog("File content error. Block data must include 32 HEX symbols");\r
                                if(strlen(buf) && feof(f))\r
                                        break;\r
                                PrintAndLog("File content error. Block data must include 32 HEX symbols");\r
+                               fclose(f);\r
                                return 2;\r
                        }\r
                        for (i = 0; i < 32; i += 2)\r
                                return 2;\r
                        }\r
                        for (i = 0; i < 32; i += 2)\r
Impressum, Datenschutz