mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
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.
This commit is contained in:
@ -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')
|
||||
|
Reference in New Issue
Block a user