summaryrefslogtreecommitdiffstats
path: root/tbl_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 /tbl_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 'tbl_term.c')
-rw-r--r--tbl_term.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tbl_term.c b/tbl_term.c
index b96804c9..f4206405 100644
--- a/tbl_term.c
+++ b/tbl_term.c
@@ -414,9 +414,9 @@ tbl_number(struct termp *tp, const struct tbl_opts *opts,
static void
tbl_word(struct termp *tp, const struct tbl_dat *dp)
{
- const void *prev_font;
+ int prev_font;
- prev_font = term_fontq(tp);
+ prev_font = tp->fonti;
if (dp->layout->flags & TBL_CELL_BOLD)
term_fontpush(tp, TERMFONT_BOLD);
else if (dp->layout->flags & TBL_CELL_ITALIC)