mirror of
https://github.com/tmux/tmux.git
synced 2026-07-21 16:31:29 +00:00
bug fix
This commit is contained in:
@@ -742,7 +742,7 @@ layout_string_write(struct layout_string *ls, const char *fmt, ...)
|
||||
len = xvsnprintf(tmp, sizeof tmp, fmt, ap);
|
||||
if (len > (sizeof (tmp)) - 1)
|
||||
goto fail;
|
||||
if (remaining < len)
|
||||
if (remaining < len + 1) /* null terminator */
|
||||
goto fail;
|
||||
memcpy(ls->write, tmp, len);
|
||||
ls->write += len;
|
||||
|
||||
Reference in New Issue
Block a user