From 7060114c06763efccd297108b6a036ea39e97b9a Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 3 Jan 2014 15:11:21 -0500 Subject: [PATCH] Prevent a possible overrun bug. --- term.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/term.c b/term.c index 1b4399a..8978925 100644 --- a/term.c +++ b/term.c @@ -63,7 +63,7 @@ static void vtopmsg(int line, const char *fmt, va_list varglist) if (line < 1 || line > NUMTOPS) line = 1; (void) move (line - 1, 0); - vsprintf(junkbuf, fmt, varglist); + vsnprintf(junkbuf, sizeof(junkbuf), fmt, varglist); (void) addstr (junkbuf); (void) clrtoeol(); } -- 2.43.0