From 5afe7eb850eeb812bdd92cebf1ab21f45c6dd814 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. --- tty-term.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tty-term.c') diff --git a/tty-term.c b/tty-term.c index 182edd7d..c7c3d11f 100644 --- a/tty-term.c +++ b/tty-term.c @@ -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') -- cgit