diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-05-24 12:48:12 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-05-24 12:48:12 +0000 |
commit | 065a26d3731f7c0da6ec831797c857f400d53335 (patch) | |
tree | 059c517afb5f914a3b127454844cd28fdc9bd20a /usr.bin/mandoc | |
parent | a47fb5638b304e81314046933a16e87a3cf1795e (diff) |
lift 64-byte max width for Sh (now BUFSIZ); from kristaps@
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r-- | usr.bin/mandoc/mdoc_validate.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index 8a4b2d98a0b..9a7fa033ee4 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.56 2010/05/24 00:00:10 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.57 2010/05/24 12:48:11 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -19,6 +19,7 @@ #include <assert.h> #include <ctype.h> #include <limits.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> @@ -1220,7 +1221,7 @@ post_sh_body(POST_ARGS) static int post_sh_head(POST_ARGS) { - char buf[64]; + char buf[BUFSIZ]; enum mdoc_sec sec; const struct mdoc_node *n; @@ -1242,13 +1243,13 @@ post_sh_head(POST_ARGS) /* XXX - copied from compact(). */ assert(MDOC_TEXT == n->type); - if (strlcat(buf, n->string, 64) >= 64) { + if (strlcat(buf, n->string, BUFSIZ) >= BUFSIZ) { mdoc_nmsg(mdoc, n, MANDOCERR_MEM); return(0); } if (NULL == n->next) continue; - if (strlcat(buf, " ", 64) >= 64) { + if (strlcat(buf, " ", BUFSIZ) >= BUFSIZ) { mdoc_nmsg(mdoc, n, MANDOCERR_MEM); return(0); } |