summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2005-05-16 21:35:45 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2005-05-16 21:35:45 +0000
commitcb804562daf8a1cca15fa1432bf27cba35e00bc9 (patch)
tree9fc6672db93ac8ab645e483fe37bc5ce54f4f623 /user
parent35e69ff1ad0e62742672e7d6072269e28d542199 (diff)
downloadapr-cb804562daf8a1cca15fa1432bf27cba35e00bc9.tar.gz
An internal API - buffer len values should be size_t
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@170455 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'user')
-rw-r--r--user/win32/userinfo.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/user/win32/userinfo.c b/user/win32/userinfo.c
index 6bee0055a..a102470c1 100644
--- a/user/win32/userinfo.c
+++ b/user/win32/userinfo.c
@@ -30,7 +30,7 @@
* depends on IsValidSid(), which internally we better test long
* before we get here!
*/
-void get_sid_string(char *buf, int blen, apr_uid_t id)
+void get_sid_string(char *buf, apr_size_t blen, apr_uid_t id)
{
PSID_IDENTIFIER_AUTHORITY psia;
DWORD nsa;
@@ -88,15 +88,14 @@ APR_DECLARE(apr_status_t) apr_uid_homepath_get(char **dirname,
strcpy(regkey, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\"
"ProfileList\\");
- keylen = strlen(regkey);
+ keylen = (DWORD)strlen(regkey);
get_sid_string(regkey + keylen, sizeof(regkey) - keylen, uid);
}
else {
strcpy(regkey, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\"
"ProfileList\\");
- keylen = strlen(regkey);
+ keylen = (DWORD)strlen(regkey);
apr_cpystrn(regkey + keylen, username, sizeof(regkey) - keylen);
-
}
if ((rv = RegOpenKeyEx(HKEY_LOCAL_MACHINE, regkey, 0,
@@ -106,7 +105,6 @@ APR_DECLARE(apr_status_t) apr_uid_homepath_get(char **dirname,
#if APR_HAS_UNICODE_FS
IF_WIN_OS_IS_UNICODE
{
-
keylen = sizeof(regkey);
rv = RegQueryValueExW(key, L"ProfileImagePath", NULL, &type,
(void*)regkey, &keylen);