Author: ekohl
Date: Sat Nov 7 21:06:07 2015
New Revision: 69841
URL:
http://svn.reactos.org/svn/reactos?rev=69841&view=rev
Log:
[USERENV]
- GetAllUsersProfileDirectoryW: Fail if lpcchSize is NULL.
- GetDefaultUserProfileDirectoryW: Fail if lpcchSize is NULL.
- GetUserProfileDirectoryW: Fail if hToken is NULL.
Modified:
trunk/reactos/dll/win32/userenv/profile.c
Modified: trunk/reactos/dll/win32/userenv/profile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/userenv/profile.…
==============================================================================
--- trunk/reactos/dll/win32/userenv/profile.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/userenv/profile.c [iso-8859-1] Sat Nov 7 21:06:07 2015
@@ -464,6 +464,12 @@
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 @@
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 @@
HKEY hKey;
LONG Error;
+ if (!hToken)
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+
if (!lpcchSize)
{
- SetLastError( ERROR_INVALID_PARAMETER );
+ SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}