rename: ul_switch_off_field -> DropField (inside cmdhf14a.c)

chg:  Fix memory bounds error (@wsmoses)
 https://github.com/Proxmark/proxmark3/commit/c3511781a16c6f3f24abe2ad9a08c0737b1dc3b0
This commit is contained in:
iceman1001 committed 2017-11-11 23:23:01 +01:00
1 parent f906cb7f89
commit 2f3dbbcaa3
15 files changed
+132 -99

No files matched your search

+4 -4
View File
@@ -869,7 +869,7 @@ int CmdLegicDump(const char *Cmd){
return usage_legic_dump();
case 'o':
case 'O':
fileNlen = param_getstr(Cmd, cmdp+1, filename);
fileNlen = param_getstr(Cmd, cmdp+1, filename, FILE_PATH_SIZE);
if (!fileNlen)
errors = true;
if (fileNlen > FILE_PATH_SIZE-5)
@@ -970,7 +970,7 @@ int CmdLegicRestore(const char *Cmd){
break;
case 'i':
case 'I':
fileNlen = param_getstr(Cmd, cmdp+1, filename);
fileNlen = param_getstr(Cmd, cmdp+1, filename, FILE_PATH_SIZE);
if (!fileNlen)
errors = true;
@@ -1099,7 +1099,7 @@ int CmdLegicELoad(const char *Cmd) {
memset(data, 0, numofbytes);
// set up file
len = param_getstr(Cmd, nameParamNo, filename);
len = param_getstr(Cmd, nameParamNo, filename, FILE_PATH_SIZE);
if (len > FILE_PATH_SIZE - 5)
len = FILE_PATH_SIZE - 5;
fnameptr += len;
@@ -1154,7 +1154,7 @@ int CmdLegicESave(const char *Cmd) {
default : numofbytes = 256; nameParamNo = 0; break;
}
fileNlen = param_getstr(Cmd, nameParamNo, filename);
fileNlen = param_getstr(Cmd, nameParamNo, filename, FILE_PATH_SIZE);
if (fileNlen > FILE_PATH_SIZE - 5)
fileNlen = FILE_PATH_SIZE - 5;