diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2020-01-16 19:20:29 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2020-01-16 19:20:29 +0000 |
commit | b02354ebc46fc90b2a5ce40950b2340435cb304c (patch) | |
tree | c43effbf22595081593d61526922f4896a4720b7 /file_io | |
parent | 06df4122c33e0fd378d67cfb0b8b510c656003bc (diff) | |
download | libapr-b02354ebc46fc90b2a5ce40950b2340435cb304c.tar.gz |
Be more forceful in identifying EBADPATH
Even when the path is first identified as a wildcard path.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1872893 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r-- | file_io/win32/filestat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/file_io/win32/filestat.c b/file_io/win32/filestat.c index 45dd7604d..38fb2dc4f 100644 --- a/file_io/win32/filestat.c +++ b/file_io/win32/filestat.c @@ -32,6 +32,8 @@ */ static apr_status_t test_safe_name(const char *name) { + apr_status_t rv = APR_SUCCESS; + /* Only accept ':' in the second position of the filename, * as the drive letter delimiter: */ @@ -41,13 +43,13 @@ static apr_status_t test_safe_name(const char *name) while (*name) { if (!IS_FNCHAR(*name) && (*name != '\\') && (*name != '/')) { if (*name == '?' || *name == '*') - return APR_EPATHWILD; + rv = APR_EPATHWILD; else return APR_EBADPATH; } ++name; } - return APR_SUCCESS; + return rv; } static apr_status_t free_localheap(void *heap) { |