[ADVAPI32]
authorThomas Faber <thomas.faber@reactos.org>
Fri, 27 Nov 2015 08:20:58 +0000 (08:20 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Fri, 27 Nov 2015 08:20:58 +0000 (08:20 +0000)
- Do not open registry keys with no access rights
CORE-10587

svn path=/trunk/; revision=70146

reactos/dll/win32/advapi32/reg/hkcr.c

index 2119c3b..13fa040 100644 (file)
@@ -263,7 +263,7 @@ CreateHKCRKey(
     }
 
     /* 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 @@ EnumHKCRKey(
             PreferredKey,
             FallbackSubKeyName,
             0,
-            0,
+            READ_CONTROL,
             &PreferredSubKey);
 
         if (ErrorCode == ERROR_SUCCESS)