Start inputs as NULL so not freeing random stack garbage, GitHub issue 2852.

This commit is contained in:
nicm 2021-08-25 06:36:05 +00:00
parent 841ce74b43
commit 78da5a3756

View File

@ -77,7 +77,7 @@ cmd_command_prompt_exec(struct cmd *self, struct cmdq_item *item)
const char *type, *s, *input;
struct cmd_command_prompt_cdata *cdata;
char *tmp, *prompts, *prompt, *next_prompt;
char *inputs, *next_input;
char *inputs = NULL, *next_input;
u_int count = args_count(args);
int wait = !args_has(args, 'b'), space = 1;