mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 20:36:35 +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;
|
HKEY hKey;
|
||||||
LONG Error;
|
LONG Error;
|
||||||
|
|
||||||
|
if (!lpcchSize)
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
Error = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
Error = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
||||||
L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
|
L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
|
||||||
0,
|
0,
|
||||||
|
@ -586,6 +592,12 @@ GetDefaultUserProfileDirectoryW(LPWSTR lpProfileDir,
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
LONG Error;
|
LONG Error;
|
||||||
|
|
||||||
|
if (!lpcchSize)
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
Error = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
Error = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
|
||||||
L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
|
L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
|
||||||
0,
|
0,
|
||||||
|
@ -839,6 +851,12 @@ GetUserProfileDirectoryW(HANDLE hToken,
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
LONG Error;
|
LONG Error;
|
||||||
|
|
||||||
|
if (!hToken)
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!lpcchSize)
|
if (!lpcchSize)
|
||||||
{
|
{
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
|
Loading…
Reference in a new issue