diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-01-27 00:56:32 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-01-27 00:56:32 +0000 |
commit | d82b8844224205bec613a0e8017033b2b8f7058f (patch) | |
tree | 707cb09963fca66b3640c69cbb28f578adba1931 /mandocdb.c | |
parent | 9c1812210ecec346a155064fef8ad4063179dc08 (diff) | |
download | mandoc-d82b8844224205bec613a0e8017033b2b8f7058f.tar.gz |
Always register names taken from file names in the names ohash.
Bug found by makewhatis -p crashing in mlink_check().
Diffstat (limited to 'mandocdb.c')
-rw-r--r-- | mandocdb.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1216,13 +1216,15 @@ mpages_merge(struct dba *dba, struct mparse *mp) if (mpage->desc == NULL) mpage->desc = mandoc_strdup(mpage->mlinks->name); - if (warnings && !use_all) - for (mlink = mpage->mlinks; mlink; - mlink = mlink->next) + for (mlink = mpage->mlinks; + mlink != NULL; + mlink = mlink->next) { + putkey(mpage, mlink->name, NAME_FILE); + if (warnings && !use_all) mlink_check(mpage, mlink); + } dbadd(dba, mpage); - mlink = mpage->mlinks; nextpage: ohash_delete(&strings); |