From: Ismael Luceno <ismael@iodev.co.uk>
To: musl@lists.openwall.com
Cc: Rich Felker <dalias@libc.org>, Ismael Luceno <ismael@iodev.co.uk>
Subject: [musl] [PATCH] nftw: Fix clobbering of errno
Date: Fri, 21 Oct 2022 23:51:24 +0200 [thread overview]
Message-ID: <20221021215124.31215-1-ismael@iodev.co.uk> (raw)
Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
---
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
next reply other threads:[~2022-10-21 21:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 21:51 Ismael Luceno [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-01-23 15:45 Ismael Luceno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221021215124.31215-1-ismael@iodev.co.uk \
--to=ismael@iodev.co.uk \
--cc=dalias@libc.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).