Changed CLI max string argument length limit from 512 to 4096. data asn1 now handles 2048 hex bytes input

This commit is contained in:
iceman1001 2023-03-12 09:53:23 +01:00
commit d02e8daba0
5 changed files with 118 additions and 87 deletions

View file

@ -12,6 +12,7 @@
#define __CLIPARSER_H
#include "argtable3.h"
#include <stdlib.h>
#include <stdbool.h>
#include "util.h"
#define arg_param_begin arg_lit0("h", "help", "This help")
@ -53,13 +54,16 @@
#define CLIGetOptionListWithReturn(ctx, paramnum, option_array, option_array_len, value) if (CLIGetOptionList(arg_get_str((ctx), (paramnum)), (option_array), (option_array_len), (value))) {CLIParserFree((ctx)); return PM3_ESOFT;}
#define MAX_INPUT_ARG_LENGTH 4096
typedef struct {
void **argtable;
size_t argtableLen;
const char *programName;
const char *programHint;
const char *programHelp;
char buf[1024 + 60];
char buf[MAX_INPUT_ARG_LENGTH + 60];
} CLIParserContext;
#define CLI_MAX_OPTLIST_LEN 50