diff options
author | 2015-01-30 17:31:20 +0000 | |
---|---|---|
committer | 2015-01-30 17:31:20 +0000 | |
commit | cb1515965e22f6ee49d207ee6fbe66f94e9230ba (patch) | |
tree | 02f8cc31065f881e03a8b83aa7744c996bdb4d79 /usr.bin/mandoc/man_term.c | |
parent | remove rndc (from bind) as well, ok deraadt (diff) | |
download | wireguard-openbsd-cb1515965e22f6ee49d207ee6fbe66f94e9230ba.tar.xz wireguard-openbsd-cb1515965e22f6ee49d207ee6fbe66f94e9230ba.zip |
Delete the redundant tbl span flags, just inspect the actual data
where needed, which is less fragile.
This fixes a subtle NULL pointer access to tp->tbl.cols:
Due to a bug in the man(7) parser, the first span of a table can
end up in a .TP head, in which case tblcalc() was never called.
Found by jsg@ with afl.
Diffstat (limited to 'usr.bin/mandoc/man_term.c')
-rw-r--r-- | usr.bin/mandoc/man_term.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c index b350643f8c1..a66ab89c2dc 100644 --- a/usr.bin/mandoc/man_term.c +++ b/usr.bin/mandoc/man_term.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man_term.c,v 1.119 2015/01/24 02:41:32 schwarze Exp $ */ +/* $OpenBSD: man_term.c,v 1.120 2015/01/30 17:31:20 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> @@ -947,7 +947,7 @@ print_man_node(DECL_ARGS) * Tables are preceded by a newline. Then process a * table line, which will cause line termination, */ - if (TBL_SPAN_FIRST & n->span->flags) + if (n->span->prev == NULL) term_newln(p); term_tbl(p, n->span); return; |