summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2016-08-13 09:14:57 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2016-08-13 09:14:57 +0000
commitd6b66b3e9ad8c458645ddd84f1cf7e304b486115 (patch)
tree661a88a87dff94bd6f5b832d71c052b8d4d474aa /usr.bin
parent77a874d074b24385e7af775bf3d4ce845dfecc32 (diff)
Even after switching from a pending head to the body, we have to
continue scanning upwards, because the enclosing block might already be pending as well, e.g. .Bl .Bl .It Bo .El .It. Tree corruption leading to a later NULL deref found by tb@ with afl(1).
Diffstat (limited to 'usr.bin')
-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 2d76e1e7369..7bc6b7057b4 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.162 2015/10/20 02:00:49 schwarze Exp $ */
+/* $OpenBSD: mdoc_macro.c,v 1.163 2016/08/13 09:14:56 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -290,7 +290,7 @@ rew_pending(struct roff_man *mdoc, const struct roff_node *n)
case ROFFT_HEAD:
roff_body_alloc(mdoc, n->line, n->pos,
n->tok);
- return;
+ break;
case ROFFT_BLOCK:
break;
default: