summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-list-keys.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2019-10-03 10:24:05 +0000
committernicm <nicm@openbsd.org>2019-10-03 10:24:05 +0000
commit4512d27dffa1b46465f22ac4878edd9458546ab4 (patch)
tree2b851aa65e262934df85c5f4122484ca06a3c58e /usr.bin/tmux/cmd-list-keys.c
parentno need to increment argv and decrement argc, we're not using them later (diff)
downloadwireguard-openbsd-4512d27dffa1b46465f22ac4878edd9458546ab4.tar.xz
wireguard-openbsd-4512d27dffa1b46465f22ac4878edd9458546ab4.zip
Do not lazily use BUFSIZ for "I don't care what size" when building
strings because it is only guaranteed to be 256 bytes and even the default 1024 is not always enough. Reported by Gregory Pakosz.
Diffstat (limited to 'usr.bin/tmux/cmd-list-keys.c')
-rw-r--r--usr.bin/tmux/cmd-list-keys.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-list-keys.c b/usr.bin/tmux/cmd-list-keys.c
index b240c17c738..b31ca97ef82 100644
--- a/usr.bin/tmux/cmd-list-keys.c
+++ b/usr.bin/tmux/cmd-list-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-list-keys.c,v 1.46 2019/05/23 14:03:44 nicm Exp $ */
+/* $OpenBSD: cmd-list-keys.c,v 1.47 2019/10/03 10:24:05 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -61,7 +61,7 @@ cmd_list_keys_exec(struct cmd *self, struct cmdq_item *item)
struct key_table *table;
struct key_binding *bd;
const char *tablename, *r;
- char *key, *cp, tmp[BUFSIZ];
+ char *key, *cp, tmp[8192];
int repeat, width, tablewidth, keywidth;
if (self->entry == &cmd_list_commands_entry)