mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
return default value when arg is not enforced with u32_1
This commit is contained in:
parent
4fb096966e
commit
4dfcd44edd
1 changed files with 2 additions and 2 deletions
|
@ -763,7 +763,7 @@ static int CmdStandalone(const char *Cmd) {
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
uint8_t arg = arg_get_u32(ctx, 1);
|
uint8_t arg = arg_get_u32_def(ctx, 1, 1);
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommandNG(CMD_STANDALONE, (uint8_t *)&arg, sizeof(arg));
|
SendCommandNG(CMD_STANDALONE, (uint8_t *)&arg, sizeof(arg));
|
||||||
|
@ -938,7 +938,7 @@ static int CmdPing(const char *Cmd) {
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
uint32_t len = arg_get_u32(ctx, 1);
|
uint32_t len = arg_get_u32_def(ctx, 1, 32);
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
|
|
||||||
if (len > PM3_CMD_DATA_SIZE)
|
if (len > PM3_CMD_DATA_SIZE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue