summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-01-31 00:12:41 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-01-31 00:12:41 +0000
commit3b15b25a7deff6f634e8233f6f8d96485308c592 (patch)
tree3db8a0db30d9044a660aacd29afe763a45f05d64 /mdoc_term.c
parent36097423ac8b35b42f700e0b63e3b6ac44d88235 (diff)
downloadmandoc-3b15b25a7deff6f634e8233f6f8d96485308c592.tar.gz
Use relative offsets instead of absolute pointers for the terminal
font stack. The latter fail after the stack is grown with realloc(). Fixing an assertion failure found by jsg@ with afl some time ago (test case number 51).
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 2b6a8c73..64e86d48 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -307,7 +307,7 @@ print_mdoc_node(DECL_ARGS)
chld = 1;
offset = p->offset;
rmargin = p->rmargin;
- n->prev_font = term_fontq(p);
+ n->prev_font = p->fonti;
memset(&npair, 0, sizeof(struct termpair));
npair.ppair = pair;