46static bool parse_args(
const uint8_t *data,
size_t size,
int *argc,
char ***argv)
54 memcpy(input, data, size);
61 for (
size_t i = 0; i < size; i++)
63 unsigned char c = (
unsigned char) input[i];
65 if (iscntrl(c) || (c ==
' '))
84 char *word_start = NULL;
86 for (
size_t i = 0; i < size; i++)
90 if (in_word && word_start)
99 word_start = &input[i];
105 if (in_word && word_start)
125 for (
int i = 0; i < argc; i++)
146 cli_parse(argc, (
char *
const *) argv, cli);
bool cli_parse(int argc, char *const *argv, struct CommandLine *cli)
Parse the Command Line.
static void free_args(int argc, char **argv)
Free the allocated argc/argv.
static bool parse_args(const uint8_t *data, size_t size, int *argc, char ***argv)
Parse fuzz input into argc/argv format.
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
bool StartupComplete
When the config has been read.
int log_disp_null(time_t stamp, const char *file, int line, const char *function, enum LogLevel level, const char *format,...)
Discard log lines - Implements log_dispatcher_t -.
int log_dispatcher_t MuttLogger
#define FREE(x)
Free memory and set the pointer to NULL.
#define MUTT_MEM_MALLOC(n, type)
Convenience wrapper for the library headers.
char * mutt_str_dup(const char *str)
Copy a string, safely.
struct CommandLine * command_line_new(void)
Create a new CommandLine.
void command_line_free(struct CommandLine **ptr)
Free a CommandLine.