aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-12-04 00:44:12 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-12-04 00:44:12 +0000
commit7c0b7e474e29ae0b4e927c6d06ad2881e2f95eec (patch)
treedaded8457cd9a70770363a061aaa716956a0c353 /man_macro.c
parent0f10c53eb575a6891b9d903803ee9f23251f36fd (diff)
downloadmandoc-7c0b7e474e29ae0b4e927c6d06ad2881e2f95eec.tar.gz
mandoc-7c0b7e474e29ae0b4e927c6d06ad2881e2f95eec.tar.zst
mandoc-7c0b7e474e29ae0b4e927c6d06ad2881e2f95eec.zip
Jumping out of man_unscope() for the root node is a bad idea
because that will skip root node validation, potentially entering rendering modules will NULL pointers lurking in the meta data. Instead, always validate the root node and (as suggested by joerg@) assert validity of the meta data before using it in the renderers. ok joerg@
Diffstat (limited to 'man_macro.c')
-rw-r--r--man_macro.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/man_macro.c b/man_macro.c
index 4c91aa2f..6afce4d0 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -1,4 +1,4 @@
-/* $Id: man_macro.c,v 1.69 2011/11/18 17:06:19 joerg Exp $ */
+/* $Id: man_macro.c,v 1.70 2011/12/04 00:44:12 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -120,8 +120,6 @@ man_unscope(struct man *m, const struct man_node *to,
assert(to);
- if (MAN_ROOT == m->last->type)
- return(1);
m->next = MAN_NEXT_SIBLING;
/* LINTED */