summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvangyzen <vangyzen@FreeBSD.org>2016-11-30 20:51:14 +0000
committervangyzen <vangyzen@FreeBSD.org>2016-11-30 20:51:14 +0000
commit2a814ff327735c1771500aa9e2fddd39931d3aa8 (patch)
treeeb83277abeb2c65ed26e62a838b50383fe353d3c
parent9f0bb5b88e4e6e110736f59959233868a8eadbcc (diff)
downloadFreeBSD-src-2a814ff327735c1771500aa9e2fddd39931d3aa8.zip
FreeBSD-src-2a814ff327735c1771500aa9e2fddd39931d3aa8.tar.gz
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
-rw-r--r--usr.bin/ncal/ncal.c3
1 files changed, 2 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud