mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-25 16:45:09 +08:00
filename checks
This commit is contained in:
parent
97f06ddcfb
commit
b8bbc1d0a5
1 changed files with 10 additions and 12 deletions
|
@ -1031,12 +1031,11 @@ static int CmdLegicRestore(const char *Cmd) {
|
|||
break;
|
||||
}
|
||||
case 'f': {
|
||||
int len = param_getstr(Cmd, cmdp + 1, filename, FILE_PATH_SIZE);
|
||||
if (!len)
|
||||
errors = true;
|
||||
else
|
||||
have_filename = true;
|
||||
|
||||
if (param_getstr(Cmd, cmdp + 1, filename, FILE_PATH_SIZE) >= FILE_PATH_SIZE) {
|
||||
PrintAndLogEx(FAILED, "Filename too long");
|
||||
break;
|
||||
}
|
||||
have_filename = true;
|
||||
cmdp += 2;
|
||||
break;
|
||||
}
|
||||
|
@ -1147,12 +1146,11 @@ static int CmdLegicELoad(const char *Cmd) {
|
|||
return usage_legic_eload();
|
||||
}
|
||||
case 'f' : {
|
||||
int len = param_getstr(Cmd, cmdp + 1, filename, FILE_PATH_SIZE);
|
||||
if (!len)
|
||||
errors = true;
|
||||
else
|
||||
have_filename = true;
|
||||
|
||||
if (param_getstr(Cmd, cmdp + 1, filename, FILE_PATH_SIZE) >= FILE_PATH_SIZE) {
|
||||
PrintAndLogEx(FAILED, "Filename too long");
|
||||
break;
|
||||
}
|
||||
have_filename = true;
|
||||
cmdp += 2;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue