From f4c7141f5d2abd06bb90443ad9edc7c1a985eb40 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 3 Oct 2019 10:24:05 +0000 Subject: 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. --- cmd-parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd-parse.y') diff --git a/cmd-parse.y b/cmd-parse.y index b0a42f7c..0cd7c6bf 100644 --- a/cmd-parse.y +++ b/cmd-parse.y @@ -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; -- cgit