diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-31 00:12:41 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-31 00:12:41 +0000 |
commit | 4ac6265c00a615f1c73a9e93009e46865afcdfd9 (patch) | |
tree | 84bf9628732ac7eeef73923d3f6f0f0f66bbc5ce /mdoc_term.c | |
parent | 6c75cc18099b6c7db33c10df54276a2baeb97ae3 (diff) | |
download | mandoc-4ac6265c00a615f1c73a9e93009e46865afcdfd9.tar.gz mandoc-4ac6265c00a615f1c73a9e93009e46865afcdfd9.tar.zst mandoc-4ac6265c00a615f1c73a9e93009e46865afcdfd9.zip |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index 3d9b9fea..1fb02aa9 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.304 2015/01/30 22:04:44 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.305 2015/01/31 00:12:41 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -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; |