diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-18 20:58:32 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-18 20:58:32 +0000 |
commit | 8ef308757ad86997cd73f49e0d336be4f912a4b7 (patch) | |
tree | 5cb16ece215b6e7d63df8fc185eeaae84ae065b6 | |
parent | 85b953eae03a3f830784be84ad2e3e45c5bcf6e7 (diff) | |
download | mandoc-8ef308757ad86997cd73f49e0d336be4f912a4b7.tar.gz |
Don't let .Ta creep into an already-closed list; same as for .It.
Fixes an assertion found by jsg@ with afl.
-rw-r--r-- | mdoc_macro.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c index f41790fb..0906e939 100644 --- a/mdoc_macro.c +++ b/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, |