From a19c95fa6a0579b54387165ee1396f52a4f586df Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 12 Jul 2012 15:11:14 +0000 Subject: The post_nm() validation function crashed when the first .Nm child node was a non-text node. Fix this by rewriting post_nm() to always set the meta name to UNKNOWN when the name is missing or unusable. While here, make MANDOCERR_NONAME an ERROR, as it usually renders the page content unintelligible. Bug reported by Maxim , thanks. OpenBSD rev. 1.105 --- read.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'read.c') diff --git a/read.c b/read.c index 5b51091c..22b8d8b6 100644 --- a/read.c +++ b/read.c @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.29 2012/05/27 17:48:57 schwarze Exp $ */ +/* $Id: read.c,v 1.30 2012/07/12 15:11:14 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011 Ingo Schwarze @@ -106,7 +106,6 @@ static const char * const mandocerrs[MANDOCERR_MAX] = { ".so is fragile, better use ln(1)", "NAME section must come first", "bad NAME section contents", - "manual name not yet set", "sections out of conventional order", "duplicate section name", "section not in conventional manual section", @@ -174,6 +173,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = { "input stack limit exceeded, infinite loop?", "skipping bad character", "escaped character not allowed in a name", + "manual name not yet set", "skipping text before the first section header", "skipping unknown macro", "NOT IMPLEMENTED, please use groff: skipping request", -- cgit v1.2.3