mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 04:20:46 +00:00
[USERENV]
- GetAllUsersProfileDirectoryW: Fail if lpcchSize is NULL. - GetDefaultUserProfileDirectoryW: Fail if lpcchSize is NULL. - GetUserProfileDirectoryW: Fail if hToken is NULL. svn path=/trunk/; revision=69841
This commit is contained in:
parent
1eff622a45
commit
3a42dbb92a
1 changed files with 19 additions and 1 deletions
|
@ -464,6 +464,12 @@ GetAllUsersProfileDirectoryW(LPWSTR lpProfileDir,
|
|||
HKEY hKey;
|
||||
LONG Error;
|
||||
|
||||
if (!lpcchSize)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Error = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
||||
L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
|
||||
0,
|
||||
|
@ -586,6 +592,12 @@ GetDefaultUserProfileDirectoryW(LPWSTR lpProfileDir,
|
|||
HKEY hKey;
|
||||
LONG Error;
|
||||
|
||||
if (!lpcchSize)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Error = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
||||
L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
|
||||
0,
|
||||
|
@ -839,9 +851,15 @@ GetUserProfileDirectoryW(HANDLE hToken,
|
|||
HKEY hKey;
|
||||
LONG Error;
|
||||
|
||||
if (!hToken)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!lpcchSize)
|
||||
{
|
||||
SetLastError( ERROR_INVALID_PARAMETER );
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue