source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: If an .Fo macro lacks its mandatory argument, don't die on an
@ 2015-08-30 19:00 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-08-30 19:00 UTC (permalink / raw)
  To: source

Log Message:
-----------
If an .Fo macro lacks its mandatory argument, don't die on an assertion.
Bug found by jsg@ with afl.

Modified Files:
--------------
    mdocml:
        mdoc_html.c

Revision Data
-------------
Index: mdoc_html.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mdoc_html.c,v
retrieving revision 1.232
retrieving revision 1.233
diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.232 -r1.233
--- mdoc_html.c
+++ 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);
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-30 19:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-30 19:00 mdocml: If an .Fo macro lacks its mandatory argument, don't die on an schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).