summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-04-20 19:40:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-04-20 19:40:13 +0000
commit846dd76f5940424c60690661ffd74602f74b5051 (patch)
tree010026608697be4b8db0f1a10b18a8f9fa9ef893 /mdoc_term.c
parentf45f622c8ebfa925e3b5340d31a0b4f9380ff675 (diff)
downloadmandoc-846dd76f5940424c60690661ffd74602f74b5051.tar.gz
make sure static buffers for snprintf(3) are large enough
and cast snprintf return value to (void) where they are
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 3df7ebc8..0bfb238d 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -620,7 +620,7 @@ static int
termp_it_pre(DECL_ARGS)
{
const struct mdoc_node *bl, *nn;
- char buf[7];
+ char buf[24];
int i;
size_t width, offset, ncols, dcol;
enum mdoc_list type;
@@ -916,7 +916,7 @@ termp_it_pre(DECL_ARGS)
break;
case LIST_enum:
(pair->ppair->ppair->count)++;
- snprintf(buf, sizeof(buf), "%d.",
+ (void)snprintf(buf, sizeof(buf), "%d.",
pair->ppair->ppair->count);
term_word(p, buf);
break;