diff options
author | 2015-08-30 18:59:44 +0000 | |
---|---|---|
committer | 2015-08-30 18:59:44 +0000 | |
commit | 42b4cdd68bc100dde6a994486095ca43e094f277 (patch) | |
tree | b2e24b510213a3f84f90f7ce535e052e2af09383 /usr.bin/mandoc/mdoc_html.c | |
parent | Clean up getaddrinfo(3) calls to make them look like the canonical (diff) | |
download | wireguard-openbsd-42b4cdd68bc100dde6a994486095ca43e094f277.tar.xz wireguard-openbsd-42b4cdd68bc100dde6a994486095ca43e094f277.zip |
If an .Fo macro lacks its mandatory argument, don't die on an assertion.
Bug found by jsg@ with afl.
Diffstat (limited to 'usr.bin/mandoc/mdoc_html.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_html.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c index 7dba7ae3579..e2605c1b9ca 100644 --- a/usr.bin/mandoc/mdoc_html.c +++ b/usr.bin/mandoc/mdoc_html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_html.c,v 1.107 2015/04/18 17:50:02 schwarze Exp $ */ +/* $OpenBSD: mdoc_html.c,v 1.108 2015/08/30 18:59:44 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -1640,11 +1640,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); |