From: Pierre LALET Date: Sun, 24 May 2015 20:43:08 +0000 (+0200) Subject: Fix filenames for hf mf cload / csave X-Git-Tag: v2.1.0~9^2 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/292fe7253596b98901fd8162bab82dd1ba394237?ds=inline Fix filenames for hf mf cload / csave --- diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index 407f34a0..2b5a5b87 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -1575,10 +1575,10 @@ int CmdHF14AMfCLoad(const char *Cmd) return 0; } else { len = strlen(Cmd); - if (len > FILE_PATH_SIZE) len = FILE_PATH_SIZE; + if (len > FILE_PATH_SIZE - 4) len = FILE_PATH_SIZE - 4; memcpy(filename, Cmd, len); - fnameptr += len-4; + fnameptr += len; sprintf(fnameptr, ".eml"); @@ -1744,7 +1744,7 @@ int CmdHF14AMfCSave(const char *Cmd) { return 0; } else { len = strlen(Cmd); - if (len > FILE_PATH_SIZE) len = FILE_PATH_SIZE; + if (len > FILE_PATH_SIZE - 4) len = FILE_PATH_SIZE - 4; if (len < 1) { // get filename