From 1b1135980418c7825be04b835d09037d1c27bcaa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 10 Dec 2001 23:59:02 +0000 Subject: Update. 2001-12-10 Thorsten Kukuk * io/ftw.c (ftw_startup): Check, if the path is search and readable. * io/Makefile (tests): Add bug-ftw3. * io/bug-ftw3.c: New file. --- io/ftw.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'io/ftw.c') diff --git a/io/ftw.c b/io/ftw.c index 862774c972..cbd6be707e 100644 --- a/io/ftw.c +++ b/io/ftw.c @@ -473,6 +473,9 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors, return -1; } + if (__access (dir, R_OK) != 0) + return -1; + data.maxdir = descriptors < 1 ? 1 : descriptors; data.actdir = 0; data.dirstreams = (struct dir_data **) alloca (data.maxdir -- cgit 1.4.1