summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2016-08-20 15:58:17 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2016-08-20 15:58:17 +0000
commitf0f97a31ae95d06394e9e80ed9db06cb7e75975b (patch)
tree8c81bd5c5486e9f01eb545d516466e1deed630e4 /usr.bin/mandoc
parent190522709ed0e7fee84878aa14b2944b609b3441 (diff)
When scanning upwards for a column list to put a .Ta macro in,
ignore body end markers of lists breaking other blocks. Fixing a logical error that caused a NULL deref found by tb@ with afl(1).
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/mdoc_macro.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c
index 7bc6b7057b4..331aeb52903 100644
--- a/usr.bin/mandoc/mdoc_macro.c
+++ b/usr.bin/mandoc/mdoc_macro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_macro.c,v 1.163 2016/08/13 09:14:56 schwarze Exp $ */
+/* $OpenBSD: mdoc_macro.c,v 1.164 2016/08/20 15:58:16 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -1457,7 +1457,7 @@ phrase_ta(MACRO_PROT_ARGS)
continue;
if (n->tok == MDOC_It && n->type == ROFFT_BODY)
body = n;
- if (n->tok == MDOC_Bl)
+ if (n->tok == MDOC_Bl && n->end == ENDBODY_NOT)
break;
}