diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-07-14 17:16:14 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-07-14 17:16:14 +0000 |
commit | 71c150db7f6c7773d4b257b009afa04a1885266a (patch) | |
tree | 9f3d57dc67e99c405a16b4557a31cc0534dd105d /usr.bin/mandoc | |
parent | 755a25766d2f8c9aff27e66475f3c2e6c8adca40 (diff) |
The .Dd and .TH macros must interrupt .ce, too;
fixing tree corruption and assertion failure found by jsg@ with afl(1)
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r-- | usr.bin/mandoc/roff.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c index 2b35d82a4e9..dfaf843c7c1 100644 --- a/usr.bin/mandoc/roff.c +++ b/usr.bin/mandoc/roff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: roff.c,v 1.195 2017/07/14 16:49:16 schwarze Exp $ */ +/* $OpenBSD: roff.c,v 1.196 2017/07/14 17:16:13 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -1557,7 +1557,8 @@ roff_parseln(struct roff *r, int ln, struct buf *buf, int *offs) /* For now, let high level macros abort .ce mode. */ if (ctl && roffce_node != NULL && - (t == TOKEN_NONE || t == ROFF_EQ || t == ROFF_TS)) { + (t == TOKEN_NONE || t == ROFF_Dd || t == ROFF_EQ || + t == ROFF_TH || t == ROFF_TS)) { r->man->last = roffce_node; r->man->next = ROFF_NEXT_SIBLING; roffce_lines = 0; |