Commit 60cb73b5 authored by Dan Kegel's avatar Dan Kegel Committed by Alexandre Julliard

advapi32: RegGetKeySecurity needs to pass length of struct to caller.

parent a8c72b76
......@@ -2234,8 +2234,10 @@ LONG WINAPI RegGetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInformati
/* FIXME: Check for valid SecurityInformation values */
if (*lpcbSecurityDescriptor < sizeof(SECURITY_DESCRIPTOR))
if (*lpcbSecurityDescriptor < sizeof(SECURITY_DESCRIPTOR)) {
*lpcbSecurityDescriptor = sizeof(SECURITY_DESCRIPTOR);
return ERROR_INSUFFICIENT_BUFFER;
}
FIXME("(%p,%d,%p,%d): stub\n",hkey,SecurityInformation,
pSecurityDescriptor,lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0);
......@@ -2243,6 +2245,7 @@ LONG WINAPI RegGetKeySecurity( HKEY hkey, SECURITY_INFORMATION SecurityInformati
/* Do not leave security descriptor filled with garbage */
RtlCreateSecurityDescriptor(pSecurityDescriptor, SECURITY_DESCRIPTOR_REVISION);
*lpcbSecurityDescriptor = sizeof(SECURITY_DESCRIPTOR);
return ERROR_SUCCESS;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment