diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-07-13 15:13:18 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-07-13 15:13:18 +0000 |
commit | 53d7cbc3682fd07a4bfcf8f68cf413cc35c89943 (patch) | |
tree | 063a55ee4e70d0715be1486467528573e4334c59 | |
parent | 093b704b943e58cc16bd6065cc571372f7059b56 (diff) | |
download | mandoc-53d7cbc3682fd07a4bfcf8f68cf413cc35c89943.tar.gz |
eqn(7) .EQ has to break man(7) next-line scope, or tree corruption
and use after free many ensue; again found by jsg@ with afl(1)
-rw-r--r-- | roff.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -2879,6 +2879,8 @@ roff_EQ(ROFF_ARGS) { struct roff_node *n; + if (r->man->macroset == MACROSET_MAN) + man_breakscope(r->man, ROFF_EQ); n = roff_node_alloc(r->man, ln, ppos, ROFFT_EQN, TOKEN_NONE); if (ln > r->man->last->line) n->flags |= NODE_LINE; |