diff options
author | 2019-10-14 09:16:48 +0000 | |
---|---|---|
committer | 2019-10-14 09:16:48 +0000 | |
commit | f382be73cc9c42315733a3bdc8b53e5db9a5eaee (patch) | |
tree | 26cbc32b7df00dc18f0991ce1b0dd92da0a420fb /usr.bin/tmux/cmd-list-keys.c | |
parent | Memory leaks, from Igor Wong in GitHub issue 1934. (diff) | |
download | wireguard-openbsd-f382be73cc9c42315733a3bdc8b53e5db9a5eaee.tar.xz wireguard-openbsd-f382be73cc9c42315733a3bdc8b53e5db9a5eaee.zip |
Some old tmux versions can sometimes generate layout strings which have
the incorrect size for the top cell. Previously tmux didn't care but now
that panes can be partly hidden, the size matters and is checked more
strictly. So add some code to fix up the most common problem and a
sanity check to reject layouts with any other size problems. Reported by
Aleksandrs Ledovskis in GitHub issue 1930.
Diffstat (limited to 'usr.bin/tmux/cmd-list-keys.c')
-rw-r--r-- | usr.bin/tmux/cmd-list-keys.c | 4 |
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 014a2a0cf13..53e53a4eba6 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.48 2019/10/03 10:39:08 nicm Exp $ */ +/* $OpenBSD: cmd-list-keys.c,v 1.49 2019/10/14 09:16:48 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -125,7 +125,7 @@ cmd_list_keys_exec(struct cmd *self, struct cmdq_item *item) cp = utf8_padcstr(table->name, tablewidth); cplen = strlen(cp) + 1; - while (tmpused + cplen + 1>= tmpsize) { + while (tmpused + cplen + 1 >= tmpsize) { tmpsize *= 2; tmp = xrealloc(tmp, tmpsize); } |