From 7c0b7e474e29ae0b4e927c6d06ad2881e2f95eec Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 4 Dec 2011 00:44:12 +0000 Subject: 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@ --- man_macro.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'man_macro.c') 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 * @@ -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 */ -- cgit v1.2.3