summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/win32/userinfo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/user/win32/userinfo.c b/user/win32/userinfo.c
index aae3f9bec..3d45df4f3 100644
--- a/user/win32/userinfo.c
+++ b/user/win32/userinfo.c
@@ -121,7 +121,8 @@ APR_DECLARE(apr_status_t) apr_uid_homepath_get(char **dirname,
else if (type == REG_EXPAND_SZ) {
apr_wchar_t path[MAX_PATH];
char retdir[MAX_PATH];
- ExpandEnvironmentStringsW((apr_wchar_t*)regkey, path, sizeof(path));
+ ExpandEnvironmentStringsW((apr_wchar_t*)regkey, path,
+ sizeof(path) / 2);
if ((rv = unicode_to_utf8_path(retdir, sizeof(retdir), path))
!= APR_SUCCESS)
return rv;