From a855f664904c73843d39db9c7754a06e0cd95f8c Mon Sep 17 00:00:00 2001 From: vangyzen Date: Wed, 30 Nov 2016 20:51:51 +0000 Subject: MFC r308340 ncal: fix a reference to an out-of-scope stack buffer PR: 214237 Submitted by: Jonathan de Boyne Pollard Sponsored by: Dell EMC --- usr.bin/ncal/ncal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.bin') diff --git a/usr.bin/ncal/ncal.c b/usr.bin/ncal/ncal.c index 5a5cbc3..25bc76f 100644 --- a/usr.bin/ncal/ncal.c +++ b/usr.bin/ncal/ncal.c @@ -1110,7 +1110,8 @@ highlight(char *dst, char *src, int len, int *extralen) static const char *term_so, *term_se; if (first) { - char tbuf[1024], cbuf[512], *b; + static char cbuf[512]; + char tbuf[1024], *b; term_se = term_so = NULL; -- cgit v1.1