From 1210421843239e4952383446e91476d8fde1c0ed Mon Sep 17 00:00:00 2001 From: Dane Jensen Date: Sun, 19 Jul 2026 18:57:42 -0700 Subject: [PATCH] bug fix --- layout-custom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout-custom.c b/layout-custom.c index d60c69a71..60bcaf686 100644 --- a/layout-custom.c +++ b/layout-custom.c @@ -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;