advapi32: Sign-compare warnings fix.
This commit is contained in:
parent
eb612fd4dc
commit
414cdc0475
|
@ -470,8 +470,8 @@ LSTATUS WINAPI RegEnumKeyExW( HKEY hkey, DWORD index, LPWSTR name, LPDWORD name_
|
||||||
KEY_NODE_INFORMATION *info = (KEY_NODE_INFORMATION *)buffer;
|
KEY_NODE_INFORMATION *info = (KEY_NODE_INFORMATION *)buffer;
|
||||||
DWORD total_size;
|
DWORD total_size;
|
||||||
|
|
||||||
TRACE( "(%p,%d,%p,%p(%d),%p,%p,%p,%p)\n", hkey, index, name, name_len,
|
TRACE( "(%p,%d,%p,%p(%u),%p,%p,%p,%p)\n", hkey, index, name, name_len,
|
||||||
name_len ? *name_len : -1, reserved, class, class_len, ft );
|
name_len ? *name_len : 0, reserved, class, class_len, ft );
|
||||||
|
|
||||||
if (reserved) return ERROR_INVALID_PARAMETER;
|
if (reserved) return ERROR_INVALID_PARAMETER;
|
||||||
if (!(hkey = get_special_root_hkey( hkey ))) return ERROR_INVALID_HANDLE;
|
if (!(hkey = get_special_root_hkey( hkey ))) return ERROR_INVALID_HANDLE;
|
||||||
|
@ -534,8 +534,8 @@ LSTATUS WINAPI RegEnumKeyExA( HKEY hkey, DWORD index, LPSTR name, LPDWORD name_l
|
||||||
KEY_NODE_INFORMATION *info = (KEY_NODE_INFORMATION *)buffer;
|
KEY_NODE_INFORMATION *info = (KEY_NODE_INFORMATION *)buffer;
|
||||||
DWORD total_size;
|
DWORD total_size;
|
||||||
|
|
||||||
TRACE( "(%p,%d,%p,%p(%d),%p,%p,%p,%p)\n", hkey, index, name, name_len,
|
TRACE( "(%p,%d,%p,%p(%u),%p,%p,%p,%p)\n", hkey, index, name, name_len,
|
||||||
name_len ? *name_len : -1, reserved, class, class_len, ft );
|
name_len ? *name_len : 0, reserved, class, class_len, ft );
|
||||||
|
|
||||||
if (reserved) return ERROR_INVALID_PARAMETER;
|
if (reserved) return ERROR_INVALID_PARAMETER;
|
||||||
if (!(hkey = get_special_root_hkey( hkey ))) return ERROR_INVALID_HANDLE;
|
if (!(hkey = get_special_root_hkey( hkey ))) return ERROR_INVALID_HANDLE;
|
||||||
|
|
|
@ -2119,28 +2119,31 @@ LookupAccountSidW(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dm) {
|
if (dm) {
|
||||||
|
DWORD ac_len = lstrlenW(ac);
|
||||||
|
DWORD dm_len = lstrlenW(dm);
|
||||||
BOOL status = TRUE;
|
BOOL status = TRUE;
|
||||||
if (*accountSize > lstrlenW(ac)) {
|
|
||||||
|
if (*accountSize > ac_len) {
|
||||||
if (account)
|
if (account)
|
||||||
lstrcpyW(account, ac);
|
lstrcpyW(account, ac);
|
||||||
}
|
}
|
||||||
if (*domainSize > lstrlenW(dm)) {
|
if (*domainSize > dm_len) {
|
||||||
if (domain)
|
if (domain)
|
||||||
lstrcpyW(domain, dm);
|
lstrcpyW(domain, dm);
|
||||||
}
|
}
|
||||||
if (((*accountSize != 0) && (*accountSize < strlenW(ac))) ||
|
if (((*accountSize != 0) && (*accountSize < ac_len)) ||
|
||||||
((*domainSize != 0) && (*domainSize < strlenW(dm)))) {
|
((*domainSize != 0) && (*domainSize < dm_len))) {
|
||||||
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||||
status = FALSE;
|
status = FALSE;
|
||||||
}
|
}
|
||||||
if (*domainSize)
|
if (*domainSize)
|
||||||
*domainSize = strlenW(dm);
|
*domainSize = dm_len;
|
||||||
else
|
else
|
||||||
*domainSize = strlenW(dm) + 1;
|
*domainSize = dm_len + 1;
|
||||||
if (*accountSize)
|
if (*accountSize)
|
||||||
*accountSize = strlenW(ac);
|
*accountSize = ac_len;
|
||||||
else
|
else
|
||||||
*accountSize = strlenW(ac) + 1;
|
*accountSize = ac_len + 1;
|
||||||
*name_use = use;
|
*name_use = use;
|
||||||
HeapFree(GetProcessHeap(), 0, computer_name);
|
HeapFree(GetProcessHeap(), 0, computer_name);
|
||||||
return status;
|
return status;
|
||||||
|
@ -4050,7 +4053,7 @@ static BOOL DumpSidNumeric(PSID psid, WCHAR **pwptr, ULONG *plen)
|
||||||
|
|
||||||
static BOOL DumpSid(PSID psid, WCHAR **pwptr, ULONG *plen)
|
static BOOL DumpSid(PSID psid, WCHAR **pwptr, ULONG *plen)
|
||||||
{
|
{
|
||||||
int i;
|
size_t i;
|
||||||
for (i = 0; i < sizeof(WellKnownSids) / sizeof(WellKnownSids[0]); i++)
|
for (i = 0; i < sizeof(WellKnownSids) / sizeof(WellKnownSids[0]); i++)
|
||||||
{
|
{
|
||||||
if (WellKnownSids[i].wstr[0] && EqualSid(psid, (PSID)&(WellKnownSids[i].Sid.Revision)))
|
if (WellKnownSids[i].wstr[0] && EqualSid(psid, (PSID)&(WellKnownSids[i].Sid.Revision)))
|
||||||
|
@ -4102,7 +4105,7 @@ static void DumpRights(DWORD mask, WCHAR **pwptr, ULONG *plen)
|
||||||
{
|
{
|
||||||
static const WCHAR fmtW[] = {'0','x','%','x',0};
|
static const WCHAR fmtW[] = {'0','x','%','x',0};
|
||||||
WCHAR buf[15];
|
WCHAR buf[15];
|
||||||
int i;
|
size_t i;
|
||||||
|
|
||||||
if (mask == 0)
|
if (mask == 0)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1599,9 +1599,6 @@ QueryServiceConfigW( SC_HANDLE hService,
|
||||||
move_string_to_buffer(&bufpos, &lpServiceConfig->lpServiceStartName);
|
move_string_to_buffer(&bufpos, &lpServiceConfig->lpServiceStartName);
|
||||||
move_string_to_buffer(&bufpos, &lpServiceConfig->lpDisplayName);
|
move_string_to_buffer(&bufpos, &lpServiceConfig->lpDisplayName);
|
||||||
|
|
||||||
if (bufpos - (LPBYTE)lpServiceConfig > cbBufSize)
|
|
||||||
ERR("Buffer overflow!\n");
|
|
||||||
|
|
||||||
TRACE("Image path = %s\n", debugstr_w(lpServiceConfig->lpBinaryPathName) );
|
TRACE("Image path = %s\n", debugstr_w(lpServiceConfig->lpBinaryPathName) );
|
||||||
TRACE("Group = %s\n", debugstr_w(lpServiceConfig->lpLoadOrderGroup) );
|
TRACE("Group = %s\n", debugstr_w(lpServiceConfig->lpLoadOrderGroup) );
|
||||||
TRACE("Dependencies = %s\n", debugstr_w(lpServiceConfig->lpDependencies) );
|
TRACE("Dependencies = %s\n", debugstr_w(lpServiceConfig->lpDependencies) );
|
||||||
|
|
Loading…
Reference in New Issue