diff options
author | 2014-12-18 20:58:00 +0000 | |
---|---|---|
committer | 2014-12-18 20:58:00 +0000 | |
commit | 2201d6b6803be77a9654dcf097b886a6a6eb261c (patch) | |
tree | 9a4bcea03bab71982017cc52aa59565d55ca8be2 /usr.bin/mandoc/mdoc_macro.c | |
parent | Update relayd to use siphash instead of sys/hash. The source-hash, (diff) | |
download | wireguard-openbsd-2201d6b6803be77a9654dcf097b886a6a6eb261c.tar.xz wireguard-openbsd-2201d6b6803be77a9654dcf097b886a6a6eb261c.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 'usr.bin/mandoc/mdoc_macro.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_macro.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c index 3dbd6602e8c..eb4fa301f18 100644 --- a/usr.bin/mandoc/mdoc_macro.c +++ b/usr.bin/mandoc/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_macro.c,v 1.114 2014/12/18 03:09:42 schwarze Exp $ */ +/* $OpenBSD: mdoc_macro.c,v 1.115 2014/12/18 20:58:00 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -1557,7 +1557,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, |