vsftpd/0031-Fix-question-mark-wildcard-withing-a-file-name.patch

29 lines
915 B
Diff
Raw Permalink Normal View History

2016-11-17 13:35:34 +00:00
From 0da42468ac9518a544aad57d22d7697d6bdfa969 Mon Sep 17 00:00:00 2001
2016-03-17 13:10:03 +00:00
From: Martin Sehnoutka <msehnout@redhat.com>
2016-11-17 13:35:34 +00:00
Date: Thu, 17 Nov 2016 13:25:12 +0100
Subject: [PATCH 31/59] Fix question mark wildcard withing a file name.
2016-03-17 13:10:03 +00:00
2016-11-17 13:35:34 +00:00
Previously '?' worked only at the end of a file name, now it can
be used anywhere.
2016-03-17 13:10:03 +00:00
---
ls.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ls.c b/ls.c
2016-11-17 13:35:34 +00:00
index 3c0988c..35c15c7 100644
2016-03-17 13:10:03 +00:00
--- a/ls.c
+++ b/ls.c
@@ -459,7 +459,8 @@ vsf_filename_passes_filter(const struct mystr* p_filename_str,
must_match_at_current_pos = 0;
}
} while (locate_result.found &&
- str_getlen(&name_remain_str) > 0 && last_token != '*');
+ str_getlen(&name_remain_str) > 0 &&
+ last_token != '*' && last_token != '?');
}
/* Any incoming string left means no match unless we ended on the correct
* type of wildcard.
--
2.14.4
2016-03-17 13:10:03 +00:00