summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-07-14 17:16:16 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-07-14 17:16:16 +0000
commit842880c9311d3fa7e5e6e669380a844fa2b6b834 (patch)
tree943faf62dad375fd576fda861bd9676fa839bf5a /roff.c
parentcf79b154bdf78ac5b9721076b30e81be3f404d07 (diff)
downloadmandoc-842880c9311d3fa7e5e6e669380a844fa2b6b834.tar.gz
The .Dd and .TH macros must interrupt .ce, too;
fixing tree corruption and assertion failure found by jsg@ with afl(1)
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/roff.c b/roff.c
index d0cd82f8..1cb12301 100644
--- a/roff.c
+++ b/roff.c
@@ -1559,7 +1559,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;