From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7510 invoked from network); 19 Aug 2021 16:56:04 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 19 Aug 2021 16:56:04 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id c4e3832b for ; Thu, 19 Aug 2021 11:56:02 -0500 (EST) Received: from localhost (mandoc.bsd.lv [local]) by mandoc.bsd.lv (OpenSMTPD) with ESMTPA id cbdc4139 for ; Thu, 19 Aug 2021 11:56:02 -0500 (EST) Date: Thu, 19 Aug 2021 11:56:02 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: do not crash when a manpath directory contains a symbolic link X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: Log Message: ----------- 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 , and my patch also tested by him on NixOS Modified Files: -------------- mandoc: mandocdb.c Revision Data ------------- Index: mandocdb.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/mandocdb.c,v retrieving revision 1.268 retrieving revision 1.269 diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.268 -r1.269 --- mandocdb.c +++ mandocdb.c @@ -629,6 +629,8 @@ treescan(void) say(path, "&stat"); continue; } + if ((ff->fts_statp->st_mode & S_IFMT) != S_IFREG) + continue; /* FALLTHROUGH */ /* -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv