From: Eric S. Raymond Date: Fri, 3 Jan 2014 20:11:21 +0000 (-0500) Subject: Prevent a possible overrun bug. X-Git-Tag: 1.12~9 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=7060114c06763efccd297108b6a036ea39e97b9a;p=vms-empire.git Prevent a possible overrun bug. --- 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(); }