summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/layout-custom.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/layout-custom.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/layout-custom.c')
-rw-r--r--usr.bin/tmux/layout-custom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/layout-custom.c b/usr.bin/tmux/layout-custom.c
index 4d6bd34c23d..2d68ad2a752 100644
--- a/usr.bin/tmux/layout-custom.c
+++ b/usr.bin/tmux/layout-custom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: layout-custom.c,v 1.15 2019/07/15 18:25:07 nicm Exp $ */
+/* $OpenBSD: layout-custom.c,v 1.16 2019/10/03 10:24:06 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -60,7 +60,7 @@ layout_checksum(const char *layout)
char *
layout_dump(struct layout_cell *root)
{
- char layout[BUFSIZ], *out;
+ char layout[8192], *out;
*layout = '\0';
if (layout_append(root, layout, sizeof layout) != 0)