diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/lineedit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 8d265a625..86ded6bc5 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -865,6 +865,9 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type) | |||
865 | if (stat(found, &st) && lstat(found, &st)) | 865 | if (stat(found, &st) && lstat(found, &st)) |
866 | goto cont; /* hmm, remove in progress? */ | 866 | goto cont; /* hmm, remove in progress? */ |
867 | 867 | ||
868 | if (type == FIND_EXE_ONLY && !file_is_executable(found)) | ||
869 | goto cont; | ||
870 | |||
868 | /* Save only name */ | 871 | /* Save only name */ |
869 | len = strlen(name_found); | 872 | len = strlen(name_found); |
870 | found = xrealloc(found, len + 2); /* +2: for slash and NUL */ | 873 | found = xrealloc(found, len + 2); /* +2: for slash and NUL */ |