From 78da5a3756a9f51f8e49d2975f74a1ea800b58b6 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 25 Aug 2021 06:36:05 +0000 Subject: Start inputs as NULL so not freeing random stack garbage, GitHub issue 2852. --- cmd-command-prompt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd-command-prompt.c') diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c index a877897e..bca1a7fc 100644 --- a/cmd-command-prompt.c +++ b/cmd-command-prompt.c @@ -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; -- cgit