diff options
author | nicm <nicm> | 2019-10-03 10:24:05 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2019-11-27 20:48:03 +0000 |
commit | 5afe7eb850eeb812bdd92cebf1ab21f45c6dd814 (patch) | |
tree | 1868623b7e523374e1aa025650e6e10236427e44 /cmd-parse.y | |
parent | b2fd161b071a7076d33119c0ff9aefdd548ff25f (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 'cmd-parse.y')
-rw-r--r-- | cmd-parse.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-parse.y b/cmd-parse.y index 6d2b970c..a51e4f6e 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; |