X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/0b14440dce5d879fed70afb455b1f7c56ee85b1e..e61530408c4b3605390748fc544b5afcfda996a3:/client/cmdhfmf.c 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