From 00dbc3009d4f54812c18b39ea2af11c5f2d1b31c 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 --- mandoc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mandoc.h') diff --git a/mandoc.h b/mandoc.h index 5aaac54c..79807423 100644 --- a/mandoc.h +++ b/mandoc.h @@ -61,7 +61,6 @@ enum mandocerr { MANDOCERR_SO, /* .so is fragile, better use ln(1) */ MANDOCERR_NAMESECFIRST, /* NAME section must come first */ MANDOCERR_BADNAMESEC, /* bad NAME section contents */ - MANDOCERR_NONAME, /* manual name not yet set */ MANDOCERR_SECOOO, /* sections out of conventional order */ MANDOCERR_SECREP, /* duplicate section name */ MANDOCERR_SECMSEC, /* section not in conventional manual section */ @@ -129,6 +128,7 @@ enum mandocerr { MANDOCERR_ROFFLOOP, /* input stack limit exceeded, infinite loop? */ MANDOCERR_BADCHAR, /* skipping bad character */ MANDOCERR_NAMESC, /* escaped character not allowed in a name */ + MANDOCERR_NONAME, /* manual name not yet set */ MANDOCERR_NOTEXT, /* skipping text before the first section header */ MANDOCERR_MACRO, /* skipping unknown macro */ MANDOCERR_REQUEST, /* NOT IMPLEMENTED: skipping request */ -- cgit