summaryrefslogtreecommitdiffstats
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-08-30 19:00:14 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-08-30 19:00:14 +0000
commit5c7a2c6bb5d2ce6ece31f59b674ba5fe68726fa7 (patch)
tree44803a8e172a29229bc0760b7582f4558690d159 /mdoc_html.c
parent01c1e070bb9640567ef7f1b0e926135d634de07d (diff)
downloadmandoc-5c7a2c6bb5d2ce6ece31f59b674ba5fe68726fa7.tar.gz
If an .Fo macro lacks its mandatory argument, don't die on an assertion.
Bug found by jsg@ with afl.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 42fe218b..29713752 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1642,11 +1642,10 @@ mdoc_fo_pre(MDOC_ARGS)
return(1);
}
- /* XXX: we drop non-initial arguments as per groff. */
+ if (n->child == NULL)
+ return(0);
- assert(n->child);
assert(n->child->string);
-
PAIR_CLASS_INIT(&tag, "fname");
t = print_otag(h, TAG_B, 1, &tag);
print_text(h, n->child->string);