diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-04-03 11:08:39 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-04-03 11:08:39 +0000 |
commit | 65c1b92bb836a60e83ebd2bd3129acffcaa02420 (patch) | |
tree | 2d2b87559bb2e2eaae4562e09161a960b1885cb2 /mdoc_action.c | |
parent | 0f15da4617d2cda375129998838b6bfd613901a4 (diff) | |
download | mandoc-65c1b92bb836a60e83ebd2bd3129acffcaa02420.tar.gz mandoc-65c1b92bb836a60e83ebd2bd3129acffcaa02420.tar.zst mandoc-65c1b92bb836a60e83ebd2bd3129acffcaa02420.zip |
Proper resetting of memory.
Array boundary fixed (-W).
Diffstat (limited to 'mdoc_action.c')
-rw-r--r-- | mdoc_action.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mdoc_action.c b/mdoc_action.c index c22fd086..c1577145 100644 --- a/mdoc_action.c +++ b/mdoc_action.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_action.c,v 1.4 2009/04/02 16:37:40 kristaps Exp $ */ +/* $Id: mdoc_action.c,v 1.5 2009/04/03 11:08:39 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org> * @@ -343,6 +343,8 @@ post_nm(POST_ARGS) if (m->meta.name) return(1); + + buf[0] = 0; if ( ! concat(m, m->last->child, buf, sizeof(buf))) return(0); if (NULL == (m->meta.name = strdup(buf))) @@ -366,6 +368,8 @@ post_sh(POST_ARGS) if (MDOC_HEAD != m->last->type) return(1); + + buf[0] = 0; if ( ! concat(m, m->last->child, buf, sizeof(buf))) return(0); if (SEC_CUSTOM != (sec = mdoc_atosec(buf))) @@ -694,6 +698,7 @@ post_dd(POST_ARGS) { char buf[64]; + buf[0] = 0; if ( ! concat(m, m->last->child, buf, sizeof(buf))) return(0); |