From b7af7b9e8703642584f4a4d05fa39afe97e38951 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 20 Jul 2017 11:27:02 -0400 Subject: [PATCH] Prevent OB1 error. --- misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc.c b/misc.c index 752838b..4b9ac2c 100644 --- a/misc.c +++ b/misc.c @@ -113,7 +113,7 @@ static void vspeak(const char* msg, bool blank, va_list ap) // Unmodified string specifier. if (msg[i] == 's') { char *arg = va_arg(ap, char *); - strncat(renderp, arg, size); + strncat(renderp, arg, size-1); size_t len = strlen(renderp); renderp += len; size -= len; -- 2.31.1