diff options
author | Branko Čibej <brane@apache.org> | 2015-06-17 03:40:20 +0000 |
---|---|---|
committer | Branko Čibej <brane@apache.org> | 2015-06-17 03:40:20 +0000 |
commit | 73dfa0f602c510cbed13b1b673ce3f48d9af4e90 (patch) | |
tree | 883484b1d920907a610868785cf61e519399500c /file_io/win32 | |
parent | 44452373e6afbdeeadcafe691079f2b188930665 (diff) | |
download | apr-73dfa0f602c510cbed13b1b673ce3f48d9af4e90.tar.gz |
apr_filepath_merge: Fix truename length calculation on Windows
in cases where the "short" name variant is actually longer than
the "long" or "true" name.
Patch submitted bu Bert Huijben <rhuijben a.o>.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1685929 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/win32')
-rw-r--r-- | file_io/win32/filepath.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/file_io/win32/filepath.c b/file_io/win32/filepath.c index 0bf5cc0ba..23870bc54 100644 --- a/file_io/win32/filepath.c +++ b/file_io/win32/filepath.c @@ -890,9 +890,9 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath, memmove(path + keptlen + namelen + 1, path + keptlen + seglen + 1, pathlen - keptlen - seglen); - pathlen += namelen - seglen; - seglen = namelen; } + pathlen += namelen - seglen; + seglen = namelen; } else { /* namelen > seglen */ if (pathlen + namelen - seglen >= sizeof(path)) |