diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2021-08-19 16:55:31 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2021-08-19 16:55:31 +0000 |
commit | 85c3fdaead0d311f9f74a2da69f7ba1e8fe998fd (patch) | |
tree | 58df22497b1da90ff20630277a969ba0344a57c8 /mandocdb.c | |
parent | c8b9d4298c238425ec68dad55b5f7411180338b6 (diff) | |
download | mandoc-85c3fdaead0d311f9f74a2da69f7ba1e8fe998fd.tar.gz |
do not crash when a manpath directory contains a symbolic link
that points to a directory rather than to a regular file;
bug reported by Lukas Epple <sternenseemann at systemli dot org>,
and my patch also tested by him on NixOS
Diffstat (limited to 'mandocdb.c')
-rw-r--r-- | mandocdb.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -629,6 +629,8 @@ treescan(void) say(path, "&stat"); continue; } + if ((ff->fts_statp->st_mode & S_IFMT) != S_IFREG) + continue; /* FALLTHROUGH */ /* |