vsftpd/0031-Fix-question-mark-wildcard-withing-a-file-name.patch
Ondřej Lysoněk 7c0626d6c4 Fix a segfault when running as PID 1
Also rebase the patches.
2018-07-25 13:32:54 +02:00

29 lines
915 B
Diff

From 0da42468ac9518a544aad57d22d7697d6bdfa969 Mon Sep 17 00:00:00 2001
From: Martin Sehnoutka <msehnout@redhat.com>
Date: Thu, 17 Nov 2016 13:25:12 +0100
Subject: [PATCH 31/59] Fix question mark wildcard withing a file name.
Previously '?' worked only at the end of a file name, now it can
be used anywhere.
---
ls.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ls.c b/ls.c
index 3c0988c..35c15c7 100644
--- 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