aboutsummaryrefslogtreecommitdiff
path: root/tty-term.c
diff options
context:
space:
mode:
authornicm <nicm>2019-10-03 10:24:05 +0000
committernicm <nicm>2019-10-03 10:24:05 +0000
commitf4c7141f5d2abd06bb90443ad9edc7c1a985eb40 (patch)
treeff3a65e8f95a1e7648d310ff625e9d22a8d17873 /tty-term.c
parentbbd1032a2a6d76cacaaf729a4b465ec7ca24eef7 (diff)
downloadrtmux-f4c7141f5d2abd06bb90443ad9edc7c1a985eb40.tar.gz
rtmux-f4c7141f5d2abd06bb90443ad9edc7c1a985eb40.tar.bz2
rtmux-f4c7141f5d2abd06bb90443ad9edc7c1a985eb40.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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tty-term.c b/tty-term.c
index 774dc9ed..c408d968 100644
--- a/tty-term.c
+++ b/tty-term.c
@@ -278,7 +278,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. */
@@ -306,7 +306,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')