]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Fix filenames for hf mf cload / csave 107/head
authorPierre LALET <pierre.lalet@cea.fr>
Sun, 24 May 2015 20:43:08 +0000 (22:43 +0200)
committerPierre LALET <pierre.lalet@cea.fr>
Sun, 24 May 2015 20:43:08 +0000 (22:43 +0200)
client/cmdhfmf.c

index 407f34a0ee7195ec6ba8e1aa5c60ea3b4f4a589d..2b5a5b87965dd7b36e283e9f94fe876f2e740dc7 100644 (file)
@@ -1575,10 +1575,10 @@ int CmdHF14AMfCLoad(const char *Cmd)
                return 0;\r
        } else {\r
                len = strlen(Cmd);\r
-               if (len > FILE_PATH_SIZE) len = FILE_PATH_SIZE;\r
+               if (len > FILE_PATH_SIZE - 4) len = FILE_PATH_SIZE - 4;\r
 \r
                memcpy(filename, Cmd, len);\r
-               fnameptr += len-4;\r
+               fnameptr += len;\r
 \r
                sprintf(fnameptr, ".eml"); \r
        \r
@@ -1744,7 +1744,7 @@ int CmdHF14AMfCSave(const char *Cmd) {
                return 0;\r
        } else {\r
                len = strlen(Cmd);\r
-               if (len > FILE_PATH_SIZE) len = FILE_PATH_SIZE;\r
+               if (len > FILE_PATH_SIZE - 4) len = FILE_PATH_SIZE - 4;\r
        \r
                if (len < 1) {\r
                        // get filename\r
Impressum, Datenschutz