[ADVAPI32]
authorEric Kohl <eric.kohl@reactos.org>
Thu, 17 Aug 2017 12:11:10 +0000 (12:11 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Thu, 17 Aug 2017 12:11:10 +0000 (12:11 +0000)
RegQueryInfoKey: Initializing *lpcbSecurityDescriptor before calling NtQueryKey fixes the remaining api tests.

svn path=/trunk/; revision=75589

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

index 0b29d1d..8fe9e36 100644 (file)
@@ -3729,6 +3729,9 @@ RegQueryInfoKeyW(HKEY hKey,
         FullInfo = &FullInfoBuffer;
     }
 
+    if (lpcbSecurityDescriptor != NULL)
+        *lpcbSecurityDescriptor = 0;
+
     Status = NtQueryKey(KeyHandle,
                         KeyFullInformation,
                         FullInfo,
@@ -3786,10 +3789,7 @@ RegQueryInfoKeyW(HKEY hKey,
                                        NULL,
                                        0,
                                        lpcbSecurityDescriptor);
-        if (Status != STATUS_BUFFER_TOO_SMALL)
-        {
-            *lpcbSecurityDescriptor = 0;
-        }
+        TRACE("NtQuerySecurityObject() returned status 0x%X\n", Status);
     }
 
     if (lpftLastWriteTime != NULL)