aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-12-18 20:58:32 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-12-18 20:58:32 +0000
commit6e90fac7fec4b2dee047eafedfb9674274f48963 (patch)
tree4958e876265d336733292da75cf8db9da649ecc6 /mdoc_macro.c
parentae42026f2d4af921af9e7b4a6d440182f31a6b79 (diff)
downloadmandoc-6e90fac7fec4b2dee047eafedfb9674274f48963.tar.gz
mandoc-6e90fac7fec4b2dee047eafedfb9674274f48963.tar.zst
mandoc-6e90fac7fec4b2dee047eafedfb9674274f48963.zip
Don't let .Ta creep into an already-closed list; same as for .It.
Fixes an assertion found by jsg@ with afl.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index daea50da..6a9deaee 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_macro.c,v 1.158 2014/12/18 03:10:11 schwarze Exp $ */
+/* $Id: mdoc_macro.c,v 1.159 2014/12/18 20:58:32 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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,