summaryrefslogtreecommitdiffstats
path: root/bin/sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh')
-rw-r--r--bin/sh/expand.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c
index df05a9a..75dcf5c 100644
--- a/bin/sh/expand.c
+++ b/bin/sh/expand.c
@@ -1292,6 +1292,10 @@ expmeta(char *enddir, char *name)
if (atend)
addfname(expdir);
else {
+ if (dp->d_type != DT_UNKNOWN &&
+ dp->d_type != DT_DIR &&
+ dp->d_type != DT_LNK)
+ continue;
if (enddir + namlen + 2 > expdir_end)
continue;
enddir[namlen] = '/';
OpenPOWER on IntegriCloud