This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
[PATCH] fix incorrect parameter passed from scandirat to scandir
- From: comicfans <comicfans44 at gmail dot com>
- To: cygwin-patches at cygwin dot com
- Cc: comicfans <comicfans44 at gmail dot com>
- Date: Tue, 4 Jul 2017 18:10:14 -0400
- Subject: [PATCH] fix incorrect parameter passed from scandirat to scandir
- Authentication-results: sourceware.org; auth=none
fullpath is stored in 'path', but 'pathname' is passed to scandir
---
winsup/cygwin/syscalls.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index faee928..df7f3c8 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -4771,7 +4771,7 @@ scandirat (int dirfd, const char *pathname, struct dirent ***namelist,
char *path = tp.c_get ();
if (gen_full_path_at (path, dirfd, pathname))
__leave;
- return scandir (pathname, namelist, select, compar);
+ return scandir (path, namelist, select, compar);
}
__except (EFAULT) {}
__endtry
--
2.13.0