summaryrefslogtreecommitdiffstats
path: root/mdoc_validate.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-08-10 12:06:41 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-08-10 12:06:41 +0000
commit7719ea3564dba8ec05799b28e3129d0a664c45f4 (patch)
tree394f06e72968d60d3ef304eff922dc22b125aaea /mdoc_validate.c
parentf53337856232ddc04ffaef7792f2ead49eac1224 (diff)
downloadmandoc-7719ea3564dba8ec05799b28e3129d0a664c45f4.tar.gz
When validating a .Bl list that defaults to -item for want of a type,
don't let a subsequent -width access mdoc_argnames[] out of bounds. Found by tb@ with afl(1).
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 6a39419e..a52358b4 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -502,6 +502,7 @@ post_bl_norm(POST_ARGS)
mandoc_msg(MANDOCERR_BL_NOTYPE, mdoc->parse,
n->line, n->pos, "Bl");
n->norm->Bl.type = LIST_item;
+ mdoclt = MDOC_Item;
}
/*