summaryrefslogtreecommitdiff
path: root/file_io/win32
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2010-04-08 19:15:24 +0000
committerJeff Trawick <trawick@apache.org>2010-04-08 19:15:24 +0000
commit8aec4da3a92f78bebfb730c3da7d6485b299c7c2 (patch)
tree39174a936949455bc115126e77efc25f31c55272 /file_io/win32
parentf2b89b2061ced969bec465f622667275cc49b857 (diff)
downloadapr-8aec4da3a92f78bebfb730c3da7d6485b299c7c2.tar.gz
avoid uninitialized memory access in apr_filepath_merge()
it was harmless other than triggering errors from tools that check memory access Submitted by: Arsen Chaloyan <achaloyan yahoo.com> Reviewed by: trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@932067 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/win32')
-rw-r--r--file_io/win32/filepath.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/file_io/win32/filepath.c b/file_io/win32/filepath.c
index 5fb216112..37cc53a39 100644
--- a/file_io/win32/filepath.c
+++ b/file_io/win32/filepath.c
@@ -949,8 +949,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
}
}
- *newpath = apr_pmemdup(p, path, pathlen + 1);
- (*newpath)[pathlen] = '\0';
+ *newpath = apr_pstrmemdup(p, path, pathlen);
return APR_SUCCESS;
}