From 10b9b5ee59df301e77a9b6e3a70e4c7e734201ec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 10 Dec 2001 23:51:23 +0000 Subject: [PATCH] (ftw_startup): Check, if the path is search and readable. --- io/ftw.c | 3 +++ 1 file changed, 3 insertions(+) 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