diff options
author | vangyzen <vangyzen@FreeBSD.org> | 2016-11-30 20:51:14 +0000 |
---|---|---|
committer | vangyzen <vangyzen@FreeBSD.org> | 2016-11-30 20:51:14 +0000 |
commit | 2a814ff327735c1771500aa9e2fddd39931d3aa8 (patch) | |
tree | eb83277abeb2c65ed26e62a838b50383fe353d3c | |
parent | 9f0bb5b88e4e6e110736f59959233868a8eadbcc (diff) | |
download | FreeBSD-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.c | 3 |
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; |