summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2021-08-25 06:36:06 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2021-08-25 06:36:06 +0000
commit17f681342705333fabc0671bff9d12e477063894 (patch)
tree55bfe325269ffee620191a4db2367e78713508e0 /usr.bin
parentdfa9ec2948eacf9cc6c04daacf5eac96b5b96b17 (diff)
Start inputs as NULL so not freeing random stack garbage, GitHub issue 2852.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/cmd-command-prompt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-command-prompt.c b/usr.bin/tmux/cmd-command-prompt.c
index 5f3930e7fb7..a7a881dd6dc 100644
--- a/usr.bin/tmux/cmd-command-prompt.c
+++ b/usr.bin/tmux/cmd-command-prompt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-command-prompt.c,v 1.60 2021/08/23 12:33:55 nicm Exp $ */
+/* $OpenBSD: cmd-command-prompt.c,v 1.61 2021/08/25 06:36:05 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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;