summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-parse.y
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2019-10-03 10:24:07 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2019-10-03 10:24:07 +0000
commitb87747c4fe6e71e95db497f7affadc746894a60c (patch)
tree73d62df2aa7db9e23fd6cb4da51bfd6607f2affa /usr.bin/tmux/cmd-parse.y
parent511320566af464d85278c082912b4706fc1464db (diff)
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-parse.y')
-rw-r--r--usr.bin/tmux/cmd-parse.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-parse.y b/usr.bin/tmux/cmd-parse.y
index 93ca1017829..d26bb18029b 100644
--- a/usr.bin/tmux/cmd-parse.y
+++ b/usr.bin/tmux/cmd-parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-parse.y,v 1.18 2019/09/10 07:50:33 nicm Exp $ */
+/* $OpenBSD: cmd-parse.y,v 1.19 2019/10/03 10:24:05 nicm Exp $ */
/*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1245,7 +1245,7 @@ yylex_token_variable(char **buf, size_t *len)
{
struct environ_entry *envent;
int ch, brackets = 0;
- char name[BUFSIZ];
+ char name[1024];
size_t namelen = 0;
const char *value;
@@ -1297,7 +1297,7 @@ yylex_token_tilde(char **buf, size_t *len)
{
struct environ_entry *envent;
int ch;
- char name[BUFSIZ];
+ char name[1024];
size_t namelen = 0;
struct passwd *pw;
const char *home = NULL;