source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Don't let .Ta creep into an already-closed list; same as for
@ 2014-12-18 20:59 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-12-18 20:59 UTC (permalink / raw)
  To: source

Log Message:
-----------
Don't let .Ta creep into an already-closed list; same as for .It.
Fixes an assertion found by jsg@ with afl.

Modified Files:
--------------
    mdocml:
        mdoc_macro.c

Revision Data
-------------
Index: mdoc_macro.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mdoc_macro.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -Lmdoc_macro.c -Lmdoc_macro.c -u -p -r1.158 -r1.159
--- mdoc_macro.c
+++ mdoc_macro.c
@@ -1559,7 +1559,8 @@ phrase_ta(MACRO_PROT_ARGS)
 	/* Make sure we are in a column list or ignore this macro. */
 
 	n = mdoc->last;
-	while (n != NULL && n->tok != MDOC_Bl)
+	while (n != NULL &&
+	    (n->tok != MDOC_Bl || n->flags & (MDOC_VALID | MDOC_BREAK)))
 		n = n->parent;
 	if (n == NULL || n->norm->Bl.type != LIST_column) {
 		mandoc_msg(MANDOCERR_TA_STRAY, mdoc->parse,
--
 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:[~2014-12-18 20:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-18 20:59 mdocml: Don't let .Ta creep into an already-closed list; same as for 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).