From f8acc64e80302314af12fd3d08c5e78149621b0c Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 14 Jul 2017 17:16:16 +0000 Subject: The .Dd and .TH macros must interrupt .ce, too; fixing tree corruption and assertion failure found by jsg@ with afl(1) --- roff.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roff.c b/roff.c index 2411477e..e2e498da 100644 --- a/roff.c +++ b/roff.c @@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.323 2017/07/14 16:49:39 schwarze Exp $ */ +/* $Id: roff.c,v 1.324 2017/07/14 17:16:16 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2010-2015, 2017 Ingo Schwarze @@ -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; -- cgit v1.2.3-56-ge451