Update length check for command data size

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
This commit is contained in:
Niel Nielsen authored and GitHub committed 2026-09-03 07:06:38 +02:00
1 parent a0573bf3cc
commit e89c30eeba
1 file changed
+2 -2
+2 -2
View File
@@ -1930,8 +1930,8 @@ static int CmdPing(const char *Cmd) {
uint32_t len = arg_get_u32_def(ctx, 1, 32);
CLIParserFree(ctx);
if (len > pm3_max_cmd_data_size())
len = pm3_max_cmd_data_size();
if (len > PM3_CMD_DATA_SIZE)
len = PM3_CMD_DATA_SIZE;
if (len) {
PrintAndLogEx(INFO, "Ping sent with payload len... " _YELLOW_("%d"), len);