diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2012-07-12 15:11:14 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2012-07-12 15:11:14 +0000 |
commit | 00dbc3009d4f54812c18b39ea2af11c5f2d1b31c (patch) | |
tree | fe7508be24a62c1d6f5ccc7988bc01217a90daea /read.c | |
parent | b675b3b7a26a6ab613fd579cb59ce6997de5ec6d (diff) | |
download | mandoc-00dbc3009d4f54812c18b39ea2af11c5f2d1b31c.tar.gz |
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 <Belooussov at gmail dot com>, thanks.
OpenBSD rev. 1.105
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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", |