diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-20 19:40:13 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-20 19:40:13 +0000 |
commit | c0c47ffe49a70fb77831194f625f593bd29c449e (patch) | |
tree | db8c1dbd3c3052a39baeff9ada43ecce15282496 /mdoc_term.c | |
parent | 29cecee7ff6894517a32d929aecee283bb85058c (diff) | |
download | mandoc-c0c47ffe49a70fb77831194f625f593bd29c449e.tar.gz mandoc-c0c47ffe49a70fb77831194f625f593bd29c449e.tar.zst mandoc-c0c47ffe49a70fb77831194f625f593bd29c449e.zip |
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index 4fbed5de..8472b8f3 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.264 2014/04/20 16:46:05 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.265 2014/04/20 19:40:13 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -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; |