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=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9451 invoked from network); 21 Oct 2022 21:51:42 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 21 Oct 2022 21:51:42 -0000 Received: (qmail 1700 invoked by uid 550); 21 Oct 2022 21:51:39 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 1661 invoked from network); 21 Oct 2022 21:51:38 -0000 From: Ismael Luceno To: musl@lists.openwall.com Cc: Rich Felker , Ismael Luceno Date: Fri, 21 Oct 2022 23:51:24 +0200 Message-Id: <20221021215124.31215-1-ismael@iodev.co.uk> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam: Yes Subject: [musl] [PATCH] nftw: Fix clobbering of errno Signed-off-by: Ismael Luceno --- src/misc/nftw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/nftw.c b/src/misc/nftw.c index 8dcff7fefd2a..5b233b2b8e77 100644 --- a/src/misc/nftw.c +++ b/src/misc/nftw.c @@ -93,8 +93,8 @@ static int do_nftw(char *path, int (*fn)(const char *, const struct stat *, int, || (de->d_name[1]=='.' && !de->d_name[2]))) continue; if (strlen(de->d_name) >= PATH_MAX-l) { - errno = ENAMETOOLONG; closedir(d); + errno = ENAMETOOLONG; return -1; } path[j]='/'; -- 2.38.1