diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2022-04-27 17:04:16 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2022-04-27 17:04:16 +0000 |
commit | 7b5064fd104ca084d6c1a9408571ee5e04a98390 (patch) | |
tree | fe98e4a5d2863c24d820ef4e9937658c9918ec79 /usr.bin | |
parent | 97aa080cdb073d315441f448e7728f3c62ef03b6 (diff) |
The .AT, .DT, and .UC macros are allowed inside next-line scope
and never produce output at the place of their invocation.
Minibugs found while investigating unrelated afl(1) reports from tb@.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mandoc/man_macro.c | 8 | ||||
-rw-r--r-- | usr.bin/mandoc/man_term.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/mandoc/man_macro.c b/usr.bin/mandoc/man_macro.c index 779b28278fe..10f07763f7f 100644 --- a/usr.bin/mandoc/man_macro.c +++ b/usr.bin/mandoc/man_macro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man_macro.c,v 1.108 2022/04/13 14:37:34 schwarze Exp $ */ +/* $OpenBSD: man_macro.c,v 1.109 2022/04/27 17:04:15 schwarze Exp $ */ /* * Copyright (c) 2012-2015,2017-2020,2022 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> @@ -63,10 +63,10 @@ static const struct man_macro man_macros[MAN_MAX - MAN_TH] = { { in_line_eoln, 0 }, /* RI */ { blk_close, MAN_XSCOPE }, /* RE */ { blk_exp, MAN_XSCOPE }, /* RS */ - { in_line_eoln, 0 }, /* DT */ - { in_line_eoln, 0 }, /* UC */ + { in_line_eoln, MAN_NSCOPED }, /* DT */ + { in_line_eoln, MAN_NSCOPED }, /* UC */ { in_line_eoln, MAN_NSCOPED }, /* PD */ - { in_line_eoln, 0 }, /* AT */ + { in_line_eoln, MAN_NSCOPED }, /* AT */ { in_line_eoln, MAN_NSCOPED }, /* in */ { blk_imp, MAN_XSCOPE }, /* SY */ { blk_close, MAN_XSCOPE }, /* YS */ diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c index 375555025e0..2152cdea691 100644 --- a/usr.bin/mandoc/man_term.c +++ b/usr.bin/mandoc/man_term.c @@ -1,6 +1,6 @@ -/* $OpenBSD: man_term.c,v 1.189 2021/06/28 19:49:57 schwarze Exp $ */ +/* $OpenBSD: man_term.c,v 1.190 2022/04/27 17:04:15 schwarze Exp $ */ /* - * Copyright (c) 2010-2015, 2017-2020 Ingo Schwarze <schwarze@openbsd.org> + * Copyright (c) 2010-2015,2017-2020,2022 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * * Permission to use, copy, modify, and distribute this software for any @@ -119,10 +119,10 @@ static const struct man_term_act man_term_acts[MAN_MAX - MAN_TH] = { { pre_alternate, NULL, 0 }, /* RI */ { NULL, NULL, 0 }, /* RE */ { pre_RS, post_RS, 0 }, /* RS */ - { pre_DT, NULL, 0 }, /* DT */ + { pre_DT, NULL, MAN_NOTEXT }, /* DT */ { pre_ign, NULL, MAN_NOTEXT }, /* UC */ { pre_PD, NULL, MAN_NOTEXT }, /* PD */ - { pre_ign, NULL, 0 }, /* AT */ + { pre_ign, NULL, MAN_NOTEXT }, /* AT */ { pre_in, NULL, MAN_NOTEXT }, /* in */ { pre_SY, post_SY, 0 }, /* SY */ { NULL, NULL, 0 }, /* YS */ |