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 | 911f176059aea8dbb5085d2191f4ae34fd849764 (patch) | |
tree | 87cea0a5fbd273073ab682ffd0da3c127044a6a0 /mdoc_action.c | |
parent | 487ee230ace82c4c67ac49c3c7192780298017de (diff) | |
download | mandoc-911f176059aea8dbb5085d2191f4ae34fd849764.tar.gz |
Proper resetting of memory.
Array boundary fixed (-W).
Diffstat (limited to 'mdoc_action.c')
-rw-r--r-- | mdoc_action.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mdoc_action.c b/mdoc_action.c index 21f3ce42..6e4834f9 100644 --- a/mdoc_action.c +++ b/mdoc_action.c @@ -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); |