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 /tty-term.c | |
parent | b2fd161b071a7076d33119c0ff9aefdd548ff25f (diff) | |
download | rtmux-5afe7eb850eeb812bdd92cebf1ab21f45c6dd814.tar.gz rtmux-5afe7eb850eeb812bdd92cebf1ab21f45c6dd814.tar.bz2 rtmux-5afe7eb850eeb812bdd92cebf1ab21f45c6dd814.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 'tty-term.c')
-rw-r--r-- | tty-term.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -281,7 +281,7 @@ static char * tty_term_strip(const char *s) { const char *ptr; - static char buf[BUFSIZ]; + static char buf[8192]; size_t len; /* Ignore strings with no padding. */ @@ -309,7 +309,7 @@ tty_term_strip(const char *s) static char * tty_term_override_next(const char *s, size_t *offset) { - static char value[BUFSIZ]; + static char value[8192]; size_t n = 0, at = *offset; if (s[at] == '\0') |