Author: tfaber
Date: Fri Nov 27 08:20:58 2015
New Revision: 70146
URL:
http://svn.reactos.org/svn/reactos?rev=70146&view=rev
Log:
[ADVAPI32]
- Do not open registry keys with no access rights
CORE-10587
Modified:
trunk/reactos/dll/win32/advapi32/reg/hkcr.c
Modified: trunk/reactos/dll/win32/advapi32/reg/hkcr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/hkc…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/reg/hkcr.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/reg/hkcr.c [iso-8859-1] Fri Nov 27 08:20:58 2015
@@ -263,7 +263,7 @@
}
/* See if the subkey already exists in HKCU. */
- ErrorCode = RegOpenKeyExW(QueriedKey, lpSubKey, 0, 0, &TestKey);
+ ErrorCode = RegOpenKeyExW(QueriedKey, lpSubKey, 0, READ_CONTROL, &TestKey);
if (ErrorCode != ERROR_FILE_NOT_FOUND)
{
if (ErrorCode == ERROR_SUCCESS)
@@ -757,7 +757,7 @@
PreferredKey,
FallbackSubKeyName,
0,
- 0,
+ READ_CONTROL,
&PreferredSubKey);
if (ErrorCode == ERROR_SUCCESS)